Sha256: e012ad31362f514f467eec7dabffdeab065a88da634bb3bdb916a968e3993080
Contents?: true
Size: 1.52 KB
Versions: 48
Compression:
Stored size: 1.52 KB
Contents
<div class="col-sm-8 col-md-6 col-sm-offset-2 col-md-offset-3"> <div class="panel panel-primary"> <div class="panel-heading"> <h4 class="panel-title"> <%= singular_table_name.titleize %> </h4> </div> <div class="panel-body"> <%- attributes.reject(&:password_digest?).each do |attribute| -%> <div class="row"> <div class="col-sm-6 col-md-4"> <strong><%= attribute.human_name %>:</strong> </div> <div class="col-sm-6 col-md-8"> <%- if attribute.type == :boolean -%> <%%= @<%= singular_table_name %>.<%= attribute.name %> ? 'Yes' : 'No' %> <%- elsif attribute.type == :integer -%> <%%= @<%= singular_table_name %>.<%= attribute.name %> ? number_with_delimiter(@<%= singular_table_name %>.<%= attribute.name %>) : '0' %> <%- elsif attribute.type == :float -%> <%%= @<%= singular_table_name %>.<%= attribute.name %> ? number_with_precision(@<%= singular_table_name %>.<%= attribute.name %>, delimiter: ',', precision: 2) : '0' %> <%- elsif attribute.type == :datetime -%> <%%= @<%= singular_table_name %>.<%= attribute.name %> ? @<%= singular_table_name %>.<%= attribute.name %>.strftime('%m/%d/%Y') : '[Invalid Date]' %> <%- else -%> <%%= @<%= singular_table_name %>.<%= attribute.name %> %> <%- end -%> </div> </div> <%- end -%> <br> <%%= link_to 'Cancel', <%= index_helper %>_path, class: 'btn btn-default' %> </div> </div> </div>
Version data entries
48 entries across 48 versions & 1 rubygems