Sha256: 4ec1736d67d8a4803d0a55f1b258ad6af9a00275535ee61a27b0fdc30227c57c

Contents?: true

Size: 1.44 KB

Versions: 3

Compression:

Stored size: 1.44 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') then -%>
                <%%= number_to_currency(<%= singular_table_name %>.<%= attribute.name %>, :locale => I18n.locale) %>
              <%- elsif @beautiful_attributes.include?(attribute.name + ':richtext') then -%>
                <%%= truncate(<%= singular_table_name %>.<%= attribute.name + "_fulltext" %>, :length => 30) %>
              <%- elsif @beautiful_attributes.include?(attribute.name + ':boolean') then -%>
                <%%= t((<%= singular_table_name %>.<%= attribute.name %> ? "yes" : "no").to_sym) %>
              <%- elsif @beautiful_attributes.include?(attribute.name + ':references') then -%>
                <%% if not <%= singular_table_name %>.<%= attribute.name %>_id.nil? then %>
                  <%%= 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-0.3.6 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.3.5 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.3.4 lib/generators/templates/app/views/partials/_index_column.html.erb