Module: Padrino::Decorator::Helpers

Defined in:
lib/padrino-decorator/helpers.rb

Overview

Registers helpers into your application

Examples:

Register the helper module

require 'padrino-decorator'
class Padrino::Application
  register Padrino::Decorator::Helpers
end

Class Method Summary collapse

Class Method Details

.registered(app) ⇒ Object Also known as: included



17
18
19
20
21
# File 'lib/padrino-decorator/helpers.rb', line 17

def registered(app)
  app.helpers Padrino::Decorator::DecorateHelpers
  app.load_paths    << File.join(app.settings.root, 'decorators')
  Padrino.dependency_paths << File.join(app.settings.root, 'decorators/**/*.rb')
end