Sha256: 85d07f32c0bc59ebeb1f7418a151989c36a783ff2e70650751d317f2c3ab396d
Contents?: true
Size: 754 Bytes
Versions: 7
Compression:
Stored size: 754 Bytes
Contents
module Commontator class ApplicationController < ActionController::Base before_filter :get_user class SecurityTransgression < StandardError; end rescue_from SecurityTransgression, :with => lambda { head(:forbidden) } protected def get_user @user = self.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
7 entries across 7 versions & 1 rubygems