Sha256: b96d583f597b9516be7be8a1fc240c68e8917e6a1895c3fdff64ac6eac21ef3c

Contents?: true

Size: 509 Bytes

Versions: 18

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
  #       object.created_at.strftime("%a %m/%d/%y")
  #     end
  #   end

end
<% end -%>

Version data entries

18 entries across 18 versions & 4 rubygems

Version Path
draper-4.0.4 lib/generators/rails/templates/decorator.rb
draper-4.0.3 lib/generators/rails/templates/decorator.rb
draper-4.0.2 lib/generators/rails/templates/decorator.rb
draper-4.0.1 lib/generators/rails/templates/decorator.rb
draper-4.0.0 lib/generators/rails/templates/decorator.rb
draper-3.1.0 lib/generators/rails/templates/decorator.rb
draper-3.0.1 lib/generators/rails/templates/decorator.rb
draper-3.0.0 lib/generators/rails/templates/decorator.rb
draper-3.0.0.pre1 lib/generators/rails/templates/decorator.rb
draper_new-3.0.0 lib/generators/rails/templates/decorator.rb
drape-1.0.0.beta1 lib/generators/rails/templates/decorator.rb
sc_core-0.0.7 test/dummy/vendor/bundle/ruby/2.2.0/gems/draper-2.1.0/lib/generators/rails/templates/decorator.rb
draper-2.1.0 lib/generators/rails/templates/decorator.rb
draper-2.0.0 lib/generators/rails/templates/decorator.rb
draper-1.4.0 lib/generators/rails/templates/decorator.rb
draper-1.3.1 lib/generators/rails/templates/decorator.rb
draper-1.3.0 lib/generators/rails/templates/decorator.rb
draper-1.2.1 lib/generators/decorator/templates/decorator.rb