Class: Para::Admin::BaseController

Inherits:
Para::ApplicationController show all
Includes:
BaseHelper
Defined in:
app/controllers/para/admin/base_controller.rb

Instance Method Summary collapse

Methods included from BaseHelper

#find_partial_for, #find_relation_name_for, #flash_message, #registered_components_options, #resource_title_for, #template_path_lookup

Methods included from Helpers::ResourceName

#resource_name

Methods inherited from Para::ApplicationController

#admin?

Instance Method Details

#current_abilityObject



23
24
25
26
27
# File 'app/controllers/para/admin/base_controller.rb', line 23

def current_ability
  @current_ability ||= if (class_name = Para::Config.ability_class_name)
    class_name.constantize.new(current_admin)
  end
end

#current_adminObject



17
18
19
20
21
# File 'app/controllers/para/admin/base_controller.rb', line 17

def current_admin
  @current_admin ||= if Para.config.current_admin_method
    send(Para.config.current_admin_method)
  end
end