Sha256: 6849cd4a0393d9c27e64620239ff9ce0a821ef74467f48ad3811e80b5a113861

Contents?: true

Size: 509 Bytes

Versions: 4

Compression:

Stored size: 509 Bytes

Contents

<%- module_namespacing do -%>
  <%- if parent_class_name.present? -%>
class <%= class_name %>Decorator < <%= parent_class_name %>
  <%- else -%>
class <%= class_name %>
  <%- end -%>
  delegate_all

  # Define presentation-specific methods here. Helpers are accessed through
  # `helpers` (aka `h`). You can override attributes, for example:
  #
  #   def created_at
  #     helpers.content_tag :span, class: 'time' do
  #       source.created_at.strftime("%a %m/%d/%y")
  #     end
  #   end

end
<% end -%>

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
draper-1.2.0 lib/generators/decorator/templates/decorator.rb
jamesgolick-draper-1.1.1a lib/generators/decorator/templates/decorator.rb
draper-1.1.0 lib/generators/decorator/templates/decorator.rb
draper-1.0.0 lib/generators/decorator/templates/decorator.rb