Sha256: 156b2fed1f46c88879c0afd79a63a8a4048f3bd0319cc1cc3a9df75b710e67c9

Contents?: true

Size: 506 Bytes

Versions: 3

Compression:

Stored size: 506 Bytes

Contents

module Commontator
  class ApplicationController < ActionController::Base
    before_filter :get_commontator
    
    protected
    
    def get_commontator
      @commontator = send Commontator.current_user_method
      raise SecurityTransgression unless (@commontator.nil? || @commontator.is_commontator)
    end
    
    def get_thread
      @thread = params[:thread_id].blank? ? \
        Commontator::Thread.find(params[:id]) : \
        Commontator::Thread.find(params[:thread_id])
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
commontator-0.2.4 app/controllers/commontator/application_controller.rb
commontator-0.2.0 app/controllers/commontator/application_controller.rb
commontator-0.1.46 app/controllers/commontator/application_controller.rb