[ARVADOS] created: 5fd2ff4941d2cf6b06c082e9496a1b6ef723bf39

Git user git at public.curoverse.com
Sun Jul 17 23:34:52 EDT 2016


        at  5fd2ff4941d2cf6b06c082e9496a1b6ef723bf39 (commit)


commit 5fd2ff4941d2cf6b06c082e9496a1b6ef723bf39
Author: Tom Clegg <tom at curoverse.com>
Date:   Sun Jul 17 23:24:11 2016 -0400

    9613: Stop prepending ":" to profile keys.

diff --git a/apps/workbench/app/views/users/profile.html.erb b/apps/workbench/app/views/users/profile.html.erb
index 4fefa82..af7a71d 100644
--- a/apps/workbench/app/views/users/profile.html.erb
+++ b/apps/workbench/app/views/users/profile.html.erb
@@ -71,7 +71,7 @@
                     </label>
                     <% if entry['type'] == 'select' %>
                       <div class="col-sm-8">
-                        <select class="form-control" name="user[prefs][:profile][:<%=entry['key']%>]">
+                        <select class="form-control" name="user[prefs][profile][<%=entry['key']%>]">
                           <% entry['options'].each do |option| %>
                             <option value="<%=option%>" <%='selected' if option==value%>><%=option%></option>
                           <% end %>
@@ -79,7 +79,7 @@
                       </div>
                     <% else %>
                       <div class="col-sm-8">
-                        <input type="text" class="form-control" name="user[prefs][:profile][:<%=entry['key']%>]" placeholder="<%=entry['form_field_description']%>" value="<%=value%>" ></input>
+                        <input type="text" class="form-control" name="user[prefs][profile][<%=entry['key']%>]" placeholder="<%=entry['form_field_description']%>" value="<%=value%>" ></input>
                       </div>
                     <% end %>
                   </div>
@@ -89,7 +89,7 @@
               <%# If the user has other prefs, we need to preserve them %>
               <% current_user.prefs.each do |key, value| %>
                 <% if key != :profile %>
-                  <input type="hidden" name="user[prefs][:<%=key%>]" value="<%=value.to_json%>">
+                  <input type="hidden" name="user[prefs][<%=key%>]" value="<%=value.to_json%>">
                 <% end %>
               <% end %>
 
diff --git a/apps/workbench/test/integration/user_profile_test.rb b/apps/workbench/test/integration/user_profile_test.rb
index a98fa35..0b20134 100644
--- a/apps/workbench/test/integration/user_profile_test.rb
+++ b/apps/workbench/test/integration/user_profile_test.rb
@@ -107,7 +107,7 @@ class UserProfileTest < ActionDispatch::IntegrationTest
     assert page.has_text? profile_message.gsub(/<.*?>/,'')
     assert page.has_text?(required_field_title), 'No text - configured required field title'
 
-    page.find_field('user[prefs][:profile][:'+required_field_key+']').set 'value to fill required field'
+    page.find_field('user[prefs][profile]['+required_field_key+']').set 'value to fill required field'
 
     click_button "Save profile"
     # profile saved and in profile page now with success

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list