Sha256: 8d144a1a1734f238cf83a6cd0734668ea81479b5e671c26fd023f0982026217a

Contents?: true

Size: 871 Bytes

Versions: 3

Compression:

Stored size: 871 Bytes

Contents

- title t('.title')

%p.nav
<% if options[:cancan] -%>
  - if can? :index, <%= class_name %>
    = link_to t('back'), <%= index_helper %>_path, class: 'index'
  - if can? :edit, @<%= singular_table_name %>
    = link_to t('edit'), edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: 'edit'
<% else -%>
  = link_to t('back'), <%= plural_name %>_path, class: 'index'
  = link_to t('edit'), edit_<%= singular_table_name %>_path(@<%= singular_table_name %>), class: 'edit'
<% end -%>

%dl
<% for attribute in attributes.reject(&:password_digest?) -%>
  %dt= <%= class_name %>.human_attribute_name :<%= attribute.name %>
<% if attribute.reference? -%>
  %dd.<%= attribute.name %>= @<%= singular_table_name %>.<%= attribute.name %>.try :name
<% else -%>
  %dd.<%= attribute.name %>= @<%= singular_table_name %>.<%= attribute.name %>
<% end -%>
<% end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
advanced_haml_scaffold_generator-2.3.1 lib/rails/generators/haml/scaffold/templates/show.html.haml
advanced_haml_scaffold_generator-2.2.1 lib/rails/generators/haml/scaffold/templates/show.html.haml
advanced_haml_scaffold_generator-2.2.0 lib/rails/generators/haml/scaffold/templates/show.html.haml