changeset 1340:6aea63dac36e bug_598

Using correct arguments on form builder helper.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Thu, 20 Jun 2013 14:51:55 +0100
parents c03a6c3c4db9
children 90d09ace39bf 834828a14f2b
files app/views/users/_form.html.erb
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/app/views/users/_form.html.erb	Thu Jun 20 14:34:42 2013 +0100
+++ b/app/views/users/_form.html.erb	Thu Jun 20 14:51:55 2013 +0100
@@ -1,5 +1,6 @@
-<%= javascript_include_tag "ssamr_institutions" %>
-
+<% content_for :header_tags do %>
+  <%= javascript_include_tag "ssamr_institutions" %>
+<% end %>
 
 <%= error_messages_for 'user' %>
 
@@ -27,9 +28,9 @@
 
 <div class="box tabular">
 	<h3><%=l(:label_ssamr_details)%></h3>
-          <%= labelled_fields_for :ssamr_user_details do |ssamr_user_detail| %>
+          <%= labelled_fields_for :ssamr_user_detail, @user.ssamr_user_detail do |ssamr_user_detail| %>
             <p>
-              <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit'  %>                            
+              <%= ssamr_user_detail.text_area :description, :rows => 3, :cols => 40, :required => true, :class => 'wiki-edit'  %>
             </p>
 
             <p><label for="institution"><%=l("field_ssamr_user_detail.institution")%> <span class="required">*</span></label>