Sha256: 64e8c8dcde7a7e36aded0c15ab9d589ce63f095cac2c1b894c7119be22f1d347

Contents?: true

Size: 446 Bytes

Versions: 7

Compression:

Stored size: 446 Bytes

Contents

require 'responders'

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

    before_action :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

7 entries across 7 versions & 1 rubygems

Version Path
fine_print-6.0.3 app/controllers/fine_print/application_controller.rb
fine_print-6.0.2 app/controllers/fine_print/application_controller.rb
fine_print-6.0.1 app/controllers/fine_print/application_controller.rb
fine_print-6.0.0 app/controllers/fine_print/application_controller.rb
fine_print-5.0.0 app/controllers/fine_print/application_controller.rb
fine_print-4.0.1 app/controllers/fine_print/application_controller.rb
fine_print-4.0.0 app/controllers/fine_print/application_controller.rb