Sha256: cdd328ace39003d38677ab11597bab8c1357c92bdba4f178b84da03237303efb

Contents?: true

Size: 1.18 KB

Versions: 3

Compression:

Stored size: 1.18 KB

Contents

<%% title "<%= plural_name.titleize %>" %>

<div class="well">
	<table class="zebra-striped">
	  <tr>
	  <%- model_attributes.each do |attribute| %>
	    <th><%= attribute.human_name.titleize %></th>
	  <%- end -%>
		<%- if action? :show -%>
      <th></th>
    <%- end -%>
    <%- if action? :edit -%>
      <th></th>
    <%- end -%>
    <%- if action? :destroy -%>
      <th></th>
    <%- end -%>
	  </tr>
	  <%% @<%= instances_name %>.each do |<%= instance_name %>| %>
	    <tr>
	    <%- model_attributes.each do |attribute| %>
	      <td><%%= <%= instance_name %>.<%= attribute.name %> %></td>
	    <%- end -%>
	    <%- if action? :show -%>
	      <td><%%= link_to "Show", <%= item_path %> %></td>
	    <%- end -%>
	    <%- if action? :edit -%>
	      <td><%%= link_to "Edit", <%= item_path :action => :edit %> %></td>
	    <%- end -%>
	    <%- if action? :destroy -%>
	      <td><%%= link_to "Destroy", <%= item_path %>, :confirm => 'Are you sure?', :method => :delete %></td>
	    <%- end -%>
	    </tr>
	  <%% end %>
	</table>
</div>
<%- if action? :new -%>
<p><%%= link_to "New <%= singular_name.titleize %>", <%= item_path :action => :new %>, :class => 'btn primary float-right' %></p>
<%- end -%>

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
bootstrapped-0.0.6 lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb
bootstrapped-0.0.4 lib/generators/bootstrapped/scaffold/templates/views/erb/index.html.erb
entropi-bootstrap-rails-0.1.0 lib/generators/bootstrap/scaffold/templates/views/erb/index.html.erb