Fixed setting all user setting to false in user profile.

This commit is contained in:
Benjamin Meichsner 2013-04-08 15:08:57 +02:00
parent 77d4caea68
commit 5b81c53a73

View file

@ -9,6 +9,7 @@
.controls .controls
- for setting in User::setting_keys.keys - for setting in User::setting_keys.keys
%label.checkbox{:for => "user[setting_attributes][#{setting}]"} %label.checkbox{:for => "user[setting_attributes][#{setting}]"}
= hidden_field_tag "user[setting_attributes][#{setting}]", '0'
= check_box_tag "user[setting_attributes][#{setting}]", '1', = check_box_tag "user[setting_attributes][#{setting}]", '1',
f.object.settings[setting] == '1' || f.object.settings_default(setting) f.object.settings[setting] == '1' || f.object.settings_default(setting)
= User::setting_keys[setting] = User::setting_keys[setting]