Sha256: 06e67a66c0687954021a9d150bc30c0b93c42e077fd3cd4bdeef6e9be5c55300
Contents?: true
Size: 910 Bytes
Versions: 58
Compression:
Stored size: 910 Bytes
Contents
module Plugins::PluginClass::MainHelper def self.included(klass) # klass.helper_method [:my_helper_method] rescue "" # here your methods accessible from views end # here all actions on going to active # you can run sql commands like this: # results = ActiveRecord::Base.connection.execute(query); # plugin: plugin model def pluginKey_on_active(plugin) end # here all actions on going to inactive # plugin: plugin model def pluginKey_on_inactive(plugin) end # here all actions to upgrade for a new version # plugin: plugin model def pluginKey_on_upgrade(plugin) end # hook listener to add settings link below the title of current plugin (if it is installed) # args: {plugin (Hash), links (Array)} # permit to add unlimmited of links... def pluginKey_on_plugin_options(args) args[:links] << link_to('Settings', admin_plugins_pluginKey_settings_path) end end
Version data entries
58 entries across 58 versions & 2 rubygems