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, #flash_shared_key, #registered_components_options, #resource_title_for, #template_path_lookup

Methods included from ExportsHelper

#export_name_for

Methods included from FlashHelper

#display_admin_flash

Methods included from TreeHelper

#actions, #delete_button, #edit_button, #max_depth_for, #needs_placeholder?

Methods included from TagHelper

#add_button_for, #icon_link_to, #listing_for, #table_for

Methods included from MarkupHelper

#alert, #panel, #resources_table

Methods included from FormHelper

#para_form_for

Methods included from NavigationHelper

#component_section_active?

Methods included from OrderingHelper

#reorder_anchor

Methods included from ModelHelper

#attribute_field_mappings_for, #excerpt_value_for, #field_value_for, #model_field_mappings, #relation_klass_for

Methods included from SearchHelper

#filtered?, #fulltext_search_param_for, #searchable_attributes

Methods included from Breadcrumbs::Controller

#add_breadcrumb, #breadcrumbs

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