Sha256: e12303fa15b352092e00b4c880a3bcaa935f008382922aaaf96ce5aa34456dcf
Contents?: true
Size: 856 Bytes
Versions: 20
Compression:
Stored size: 856 Bytes
Contents
<% content_for :title, "#{klass_name}" %> <%= content_tag :p, link_to("New #{klass_name}", [:new, klass_table_name.singularize ], class: 'btn btn-primary') %></p> <table border="0" cellpadding="4" class="table table-hover table-bordered"> <thead> <tr> <th></th> <%= raw readable_attributes.map{|a| "<th>#{a.to_s.titleize}</th>\n" }.join %> </tr> </thead> <tbody> <%- @records.each do |record| %> <tr> <td> <%= link_to "Edit", [:edit, record], :class => "btn btn-default btn-xs" %> <%= link_to("Delete", record, method: :delete, data: { confirm: "Are you sure you want to delete this #{klass_name}?" }, class: 'btn btn-danger btn-xs') if record.persisted? %> </td> <%- readable_attributes.map(&:to_sym).each do |attribute| %> <td><%= record[attribute] %></td> <% end -%> </tr> <% end -%> </tbody> </table>
Version data entries
20 entries across 20 versions & 1 rubygems