class Trestle::Configuration

Constants

Action

Callbacks

Public Instance Methods

after_action(options={}, &block) click to toggle source

Register a global after action

# File lib/trestle/configuration.rb, line 134
def after_action(options={}, &block)
  after_actions << Action.new(options, block)
end
around_action(options={}, &block) click to toggle source

Register a global around action

# File lib/trestle/configuration.rb, line 142
def around_action(options={}, &block)
  around_actions << Action.new(options, block)
end
before_action(options={}, &block) click to toggle source

Register a global before action

# File lib/trestle/configuration.rb, line 126
def before_action(options={}, &block)
  before_actions << Action.new(options, block)
end
form_field(name, klass) click to toggle source

Register a custom form field class

# File lib/trestle/configuration.rb, line 85
def form_field(name, klass)
  Form::Builder.register(name, klass)
end
helper(*helpers, &block) click to toggle source

Register global helpers available to all Trestle admins

# File lib/trestle/configuration.rb, line 67
def helper(*helpers, &block)
  self.helpers += helpers
  self.helper_module.module_eval(&block) if block_given?
end
hook(name, options={}, &block) click to toggle source

Register an extension hook

# File lib/trestle/configuration.rb, line 93
def hook(name, options={}, &block)
  hooks.append(name, options, &block)
end
menu(&block) click to toggle source

Register a global navigation menu block