Sha256: 7fbe6b1d552b035918e5bec614004db7f555cc29611e427fbf8c134325e98d92

Contents?: true

Size: 346 Bytes

Versions: 4

Compression:

Stored size: 346 Bytes

Contents

module FinePrint
  class ApplicationController < ActionController::Base
    respond_to :html

    before_filter :get_user, :can_manage

    protected

    def get_user
      @user = instance_exec &FinePrint.current_user_proc
    end

    def can_manage
      with_interceptor { instance_exec @user, &FinePrint.can_manage_proc }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fine_print-2.0.3 app/controllers/fine_print/application_controller.rb
fine_print-2.0.2 app/controllers/fine_print/application_controller.rb
fine_print-2.0.1 app/controllers/fine_print/application_controller.rb
fine_print-2.0.0 app/controllers/fine_print/application_controller.rb