use helper methods in form view
This commit is contained in:
@@ -12,10 +12,10 @@
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
<% [:company_name, :firstname, :lastname, :streetname, :zipcode, :city, :country, :email, :phone].each do |attrib|%>
|
||||
<% client_form_fields.each do |attrib| %>
|
||||
<div>
|
||||
<%= form.label attrib, style: "display: block" %>
|
||||
<%= form.text_field attrib %><br>
|
||||
<%= form.text_field attrib, value: client.send(attrib) %><br>
|
||||
</div>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user