Sha256: ddf17c34101aa2ed61ce3faffdce93202945cd822d2b6846d10fb1376d8767c9

Contents?: true

Size: 1.22 KB

Versions: 3

Compression:

Stored size: 1.22 KB

Contents

<%- attributes.each do |attribute| -%>
            <td <%%= visible_column("<%= singular_table_name %>", "<%= attribute.name %>") %> class="bs-col-<%= attribute.name %> <%%= align_attribute("<%= attribute.type %>") %>">
              <%- if @beautiful_attributes.include?(attribute.name + ':price') -%>
                <%%= number_to_currency(<%= singular_table_name %>.<%= attribute.name %>, :locale => I18n.locale) %>
              <%- elsif @beautiful_attributes.include?(attribute.name + ':boolean') -%>
                <%%= t((<%= singular_table_name %>.<%= attribute.name %> ? "yes" : "no").to_sym) %>
              <%- elsif @beautiful_attributes.include?(attribute.name + ':references') -%>
                <%% if !<%= singular_table_name %>.<%= attribute.name %>_id.nil? %>
                  <%%= link_to <%= singular_table_name %>.<%= attribute.name %>.caption, <%= namespace_for_route %><%= attribute.name %>_path(<%= singular_table_name %>.<%= attribute.name %>_id) %>
                <%% else %>
                  <%%= t(:any, :default => "Any") %>
                <%% end %>
              <%- else -%>
                <%%= <%= singular_table_name %>.<%= attribute.name %> %>
              <%- end -%>
            </td>
<%- end -%>

Version data entries

3 entries across 3 versions & 1 rubygems

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