Sha256: 0f02a28de2cc1647e5a26a9cc3a5d22e984a976abc7295419d686446f0ae7ad1

Contents?: true

Size: 1.25 KB

Versions: 8

Compression:

Stored size: 1.25 KB

Contents

<%- attributes.each do |attribute| -%>
  <td <%%= visible_column("<%= singular_table_name %>", "<%= attribute.name %>") %> class="col-<%= attribute.name %> <%%= align_attribute("<%= attribute.type %>") %>">
    <%- if @beautiful_attributes.include?(attribute.name + ':price') then -%>
      <%%= number_to_currency(<%= singular_table_name %>.<%= attribute.name %>) %>
    <%- 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 %>_id.to_s, <%= 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

8 entries across 8 versions & 1 rubygems

Version Path
beautiful_scaffold-0.2.2 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.2.1 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.2.0 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.1.9 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.1.8 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.1.7 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.1.5 lib/generators/templates/app/views/partials/_index_column.html.erb
beautiful_scaffold-0.1.4 lib/generators/templates/app/views/partials/_index_column.html.erb