Module: Plugins::PluginClass::MainHelper
- Included in:
- AdminController, FrontController
- Defined in:
- lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#pluginKey_on_active(plugin) ⇒ Object
here all actions on going to active you can run sql commands like this: results = ActiveRecord::Base.connection.execute(query); plugin: plugin model.
-
#pluginKey_on_inactive(plugin) ⇒ Object
here all actions on going to inactive plugin: plugin model.
-
#pluginKey_on_plugin_options(args) ⇒ Object
hook listener to add settings link below the title of current plugin (if it is installed) args: (Hash), links (Array) permit to add unlimmited of links…
-
#pluginKey_on_upgrade(plugin) ⇒ Object
here all actions to upgrade for a new version plugin: plugin model.
Class Method Details
.included(klass) ⇒ Object
4 5 6 |
# File 'lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb', line 4 def self.included(klass) # klass.helper_method [:my_helper_method] rescue "" # here your methods accessible from views end |
Instance Method Details
#pluginKey_on_active(plugin) ⇒ Object
here all actions on going to active you can run sql commands like this: results = ActiveRecord::Base.connection.execute(query); plugin: plugin model
12 |
# File 'lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb', line 12 def pluginKey_on_active(plugin); end |
#pluginKey_on_inactive(plugin) ⇒ Object
here all actions on going to inactive plugin: plugin model
16 |
# File 'lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb', line 16 def pluginKey_on_inactive(plugin); end |
#pluginKey_on_plugin_options(args) ⇒ Object
hook listener to add settings link below the title of current plugin (if it is installed) args: (Hash), links (Array) permit to add unlimmited of links…
25 26 27 |
# File 'lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb', line 25 def (args) args[:links] << link_to('Settings', admin_plugins_pluginKey_settings_path) end |
#pluginKey_on_upgrade(plugin) ⇒ Object
here all actions to upgrade for a new version plugin: plugin model
20 |
# File 'lib/generators/camaleon_cms/gem_plugin_template/app/helpers/plugins/my_plugin/main_helper.rb', line 20 def pluginKey_on_upgrade(plugin); end |