Module: Para::Config
- Defined in:
- lib/para/config.rb
Constant Summary collapse
- @@authenticate_admin_method =
:authenticate_admin_user!
- @@current_admin_method =
:current_admin_user
- @@pagination_theme =
'twitter-bootstrap-3'
- @@admin_title =
nil
- @@default_tree_max_depth =
3
- @@resource_name_methods =
[:admin_name, :admin_title, :name, :title]
- @@plugins =
[]
- @@ability_class_name =
'Para::Ability'
- @@page_actions =
{}
Class Method Summary collapse
- .add_actions_for(type, &block) ⇒ Object
-
.method_missing(method_name, *args, &block) ⇒ Object
Allows accessing plugins root module to configure them through a method from the Para::Config class.
- .page_actions_for(type) ⇒ Object
- .routes ⇒ Object
Class Method Details
.add_actions_for(type, &block) ⇒ Object
60 61 62 |
# File 'lib/para/config.rb', line 60 def self.add_actions_for(type, &block) page_actions_for(type) << block end |
.method_missing(method_name, *args, &block) ⇒ Object
43 44 45 46 47 48 49 50 |
# File 'lib/para/config.rb', line 43 def self.method_missing(method_name, *args, &block) if plugins.include?(method_name) plugin = Para::Plugins.module_name_for(method_name).constantize block ? block.call(plugin) : plugin else super end end |
.page_actions_for(type) ⇒ Object
56 57 58 |
# File 'lib/para/config.rb', line 56 def self.page_actions_for(type) page_actions[type] ||= [] end |