Sha256: e15fbb08923dcf03f465779a3e0e8ea58e634445fe9c6ac9ea9b7c4f4eecb26d

Contents?: true

Size: 829 Bytes

Versions: 8

Compression:

Stored size: 829 Bytes

Contents

class <%= singular_name.camelize %>Decorator < Draper::Base

  # Rails Helpers
  #   Rails helpers like content_tag, link_to, and pluralize are already
  #   available to you. If you need access to other helpers, include them
  #   like this:
  #     include ActionView::Helpers::TextHelper
  #   Or pull in the whole kitchen sink:
  #     include ActionView::Helpers

  # Wrapper Methods
  #   Control access to the wrapped subject's methods using one of the following:
  #
  #   To allow _only_ the listed methods:
  #     allows :method1, :method2
  #
  #   To allow everything _except_ the listed methods:
  #     denies :method1, :method2

  # Presentation Methods
  #   Define presentation-related instance methods. Ex:
  #     def formatted_created_at
  #       content_tag :span, created_at.strftime("%A")
  #     end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
draper-0.4.1.1 lib/generators/draper/model/templates/model.rb
draper-0.4.1 lib/generators/draper/model/templates/model.rb
draper-0.4.0 lib/generators/draper/model/templates/model.rb
draper-0.3.5 lib/generators/draper/model/templates/model.rb
draper-0.3.4 lib/generators/draper/model/templates/model.rb
draper-0.3.3 lib/generators/draper/model/templates/model.rb
draper-0.3.2 lib/generators/draper/model/templates/model.rb
draper-0.3.1 lib/generators/draper/model/templates/model.rb