From 5b81c53a7343c79698173deba43a80d605fee3af Mon Sep 17 00:00:00 2001 From: Benjamin Meichsner Date: Mon, 8 Apr 2013 15:08:57 +0200 Subject: [PATCH] Fixed setting all user setting to false in user profile. --- app/views/shared/_user_form_fields.html.haml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/views/shared/_user_form_fields.html.haml b/app/views/shared/_user_form_fields.html.haml index ac1f9a5d..fa11b393 100644 --- a/app/views/shared/_user_form_fields.html.haml +++ b/app/views/shared/_user_form_fields.html.haml @@ -9,6 +9,7 @@ .controls - for setting in User::setting_keys.keys %label.checkbox{:for => "user[setting_attributes][#{setting}]"} + = hidden_field_tag "user[setting_attributes][#{setting}]", '0' = check_box_tag "user[setting_attributes][#{setting}]", '1', f.object.settings[setting] == '1' || f.object.settings_default(setting) = User::setting_keys[setting]