Sha256: 6e30b0c84b42a3d5dff358fd962d2d6d7cedf5f27d4fcc4363de19cdd8c622f2

Contents?: true

Size: 784 Bytes

Versions: 3

Compression:

Stored size: 784 Bytes

Contents

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

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
beautiful_scaffold-2.0.1 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-2.0.0 lib/generators/templates/app/views/partials/_show_field.html.erb
beautiful_scaffold-2.0.0.pre lib/generators/templates/app/views/partials/_show_field.html.erb