Sha256: 23feb0a756ad3b9573c9b6a56fe7562c4938a5ee595c65c9b57d1b3e3d01f8fb

Contents?: true

Size: 632 Bytes

Versions: 9

Compression:

Stored size: 632 Bytes

Contents

module Commontator
  class CommontatorController < ActionController::Base
    before_filter :get_user
    
    protected
    
    def get_user
      @user = ApplicationController.send Commontator.current_user_method	
      raise SecurityTransgression unless (@user.nil? || @user.is_commontator)
    end
    
    def get_thread
      @thread = params[:thread_id].blank? ? \
        Commontator::Thread.find(params[:id]) : \
        Commontator::Thread.find(params[:thread_id])
    end
    
    def get_commontable_url
      @commontable_url = @thread.config.commontable_url_proc.call(main_app, @thread.commontable)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
commontator-1.1.1 app/controllers/commontator/commontator_controller.rb~
commontator-1.1.0 app/controllers/commontator/commontator_controller.rb~
commontator-1.0.6 app/controllers/commontator/commontator_controller.rb~
commontator-1.0.5 app/controllers/commontator/commontator_controller.rb~
commontator-1.0.4 app/controllers/commontator/commontator_controller.rb~
commontator-1.0.3 app/controllers/commontator/commontator_controller.rb~
commontator-1.0.2 app/controllers/commontator/commontator_controller.rb~
commontator-1.0.1 app/controllers/commontator/commontator_controller.rb~
commontator-1.0.0 app/controllers/commontator/commontator_controller.rb~