Sha256: 6558f7ffc722061f41d526effbf75d26c8f2f307d794749a1c8c1e24c22ba498

Contents?: true

Size: 486 Bytes

Versions: 3

Compression:

Stored size: 486 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[:thread_id]) : Commontator::Thread.find(params[: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~