Class: Para::Admin::BaseController
Instance Method Summary
collapse
Methods included from BaseHelper
#find_partial_for, #find_relation_name_for, #flash_message, #flash_shared_key, #registered_components_options, #resource_title_for, #template_path_lookup
#resource_name
#admin?
Instance Method Details
#current_ability ⇒ Object
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_admin ⇒ Object
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
|