Sha256: a81c04b1fdedbcca21133feab3337af9319d9ed2475d0265db9497f70e38485a

Contents?: true

Size: 405 Bytes

Versions: 3

Compression:

Stored size: 405 Bytes

Contents

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

    before_filter :get_user, :can_manage

    layout FinePrint.layout

    helper FinePrint.helpers

    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

3 entries across 3 versions & 1 rubygems

Version Path
fine_print-2.2.1 app/controllers/fine_print/application_controller.rb
fine_print-2.2.0 app/controllers/fine_print/application_controller.rb
fine_print-2.1.1 app/controllers/fine_print/application_controller.rb