Sha256: 283a4545fd0e1e722e368914a0a75912f896c0a82c6a3bf878d19a39c019960b

Contents?: true

Size: 1013 Bytes

Versions: 12

Compression:

Stored size: 1013 Bytes

Contents

class <%= singular_name.camelize %>Decorator < ApplicationDecorator
  decorates :<%= singular_name.to_sym %>

  # Accessing Helpers
  #   You can access any helper via a proxy
  #
  #   Normal Usage: helpers.number_to_currency(2)
  #   Abbreviated : h.number_to_currency(2)
  #   
  #   Or, optionally enable "lazy helpers" by calling this method:
  #     lazy_helpers
  #   Then use the helpers with no proxy:
  #     number_to_currency(2)

  # Defining an Interface
  #   Control access to the wrapped subject's methods using one of the following:
  #
  #   To allow only the listed methods (whitelist):
  #     allows :method1, :method2
  #
  #   To allow everything except the listed methods (blacklist):
  #     denies :method1, :method2

  # Presentation Methods
  #   Define your own instance methods, even overriding accessors
  #   generated by ActiveRecord:
  #   
  #   def created_at
  #     h.content_tag :span, time.strftime("%a %m/%d/%y"), 
  #                   :class => 'timestamp'
  #   end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
draper-0.9.5 lib/generators/draper/decorator/templates/decorator.rb
draper-0.9.3 lib/generators/draper/decorator/templates/decorator.rb
draper-0.9.2 lib/generators/draper/decorator/templates/decorator.rb
draper-0.9.1 lib/generators/draper/decorator/templates/decorator.rb
draper-0.9.0 lib/generators/draper/decorator/templates/decorator.rb
draper-0.8.1 lib/generators/draper/decorator/templates/decorator.rb
draper-0.8.0 lib/generators/draper/decorator/templates/decorator.rb
draper-0.7.4 lib/generators/draper/decorator/templates/decorator.rb
draper-0.7.3 lib/generators/draper/decorator/templates/decorator.rb
draper-0.7.2 lib/generators/draper/decorator/templates/decorator.rb
draper-0.7.1 lib/generators/draper/decorator/templates/decorator.rb
draper-0.7.0 lib/generators/draper/decorator/templates/decorator.rb