diff --git a/app/helpers/clients_helper.rb b/app/helpers/clients_helper.rb index 01829b1..fc4c84b 100644 --- a/app/helpers/clients_helper.rb +++ b/app/helpers/clients_helper.rb @@ -2,4 +2,8 @@ module ClientsHelper def client_form_fields [:company_name, :firstname, :lastname, :streetname, :zipcode, :city, :country, :email, :phone] end + + def client_view_fields + [:company_name, :firstname, :lastname, :streetname, :zipcode, :city, :country, :email, :phone] + end end diff --git a/app/views/clients/_client.html.erb b/app/views/clients/_client.html.erb index 4133422..3e6a7c5 100644 --- a/app/views/clients/_client.html.erb +++ b/app/views/clients/_client.html.erb @@ -1,47 +1,14 @@ -
- Company name: - <%= client.company_name %> -
- -- Firstname: - <%= client.firstname %> -
- -- Lastname: - <%= client.lastname %> -
- -- Streetname: - <%= client.streetname %> -
- -- Zipcode: - <%= client.zipcode %> -
- -- City: - <%= client.city %> -
- -- Country: - <%= client.country %> -
- -- Email: - <%= client.email %> -
- -- Phone: - <%= client.phone %> -
- -- <%= link_to "Show this client", client %> -
- <% end %> +| <%= attrib.to_s.humanize %> | + <% end %> +
|---|
<%= notice %>
-<%= render @client %> +<% content_for :title, "Client: #{@client.company_name}" %> + +| <%= attrib.to_s.humanize %> | + <% end %> +
|---|