Sha256: 961ccc889027538d444a0bddea9e9efbcca738ce88a47bad7b9cd81dd4744134

Contents?: true

Size: 815 Bytes

Versions: 20

Compression:

Stored size: 815 Bytes

Contents

<%- attributes.each do |attribute| -%>
  <p>
    <b><%%= t(:<%= attribute.name %>, :default => "<%= attribute.human_name %>") %>:</b>
    <%- if @beautiful_attributes.include?(attribute.name + ':price') then -%>
      <%%= number_to_currency(@<%= singular_table_name %>.<%= attribute.name %>) %>
    <%- elsif @beautiful_attributes.include?(attribute.name + ':boolean') then -%>
      <%%= t((@<%= singular_table_name %>.<%= attribute.name %> ? "yes".to_sym : "no".to_sym)) %>
    <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
      <%%= (@<%= singular_table_name %>.<%= attribute.name %>.nil? ? "" : @<%= singular_table_name %>.<%= attribute.name %>.caption) %>
    <%- else -%>
      <%%= @<%= singular_table_name %>.<%= attribute.name %> %>
    <%- end -%>
  </p>
<%- end -%>

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
beautiful_scaffold-0.2.7 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.2.6 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.2.5 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.2.4 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.2.3 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.2.2 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.2.1 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.2.0 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.9 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.8 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.7 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.5 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.4 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.3 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.2 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.1 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.1.0 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.0.8 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.0.7 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-0.0.6 lib/generators/templates/app/views/partials/_show_field.html.erb