Basic feature implemented, very basic poc
This commit is contained in:
parent
216089a3e7
commit
48c0067076
118 changed files with 2113 additions and 20 deletions
17
lib/templates/erb/scaffold/partial.html.erb.tt
Normal file
17
lib/templates/erb/scaffold/partial.html.erb.tt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
<div id="<%%= dom_id <%= singular_name %> %>">
|
||||
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
||||
<p>
|
||||
<strong><%= attribute.human_name %>:</strong>
|
||||
<% if attribute.attachment? -%>
|
||||
<%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %>
|
||||
<% elsif attribute.attachments? -%>
|
||||
<%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %>
|
||||
<div><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %></div>
|
||||
<%% end %>
|
||||
<% else -%>
|
||||
<%%= <%= singular_name %>.<%= attribute.column_name %> %>
|
||||
<% end -%>
|
||||
</p>
|
||||
|
||||
<% end -%>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue