Sha256: fc2ae5d4c21556950c6d82e04315ab203e423b4ba26d639b2c71a4cbe46227e8

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

require 'responders'

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

    before_filter :get_user, :can_manage

    layout FinePrint.config.layout

    helper FinePrint.config.helpers

    protected

    def get_user
      @user = instance_exec &FinePrint.config.current_user_proc
    end

    def can_manage
      instance_exec @user, &FinePrint.config.authenticate_manager_proc
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fine_print-3.1.0 app/controllers/fine_print/application_controller.rb
fine_print-3.0.0 app/controllers/fine_print/application_controller.rb