diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 8cb796fe288a4a35141cd570d2909ca330ae43c0..f7a2b3f948203b806d81f3688b2942cbe0ab0134 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -162,6 +162,29 @@ class UsersController < ApplicationController private def user_params - params.fetch(:user).permit(:username, :email, :current_password, :password, :password_confirmation, :language, :disable_mail, :invitation_service, :invitation_identifier, :show_community_spotlight_in_stream, :auto_follow_back, :auto_follow_back_aspect_id, :remember_me, :email_preferences => [:also_commented, :mentioned, :comment_on_post, :private_message, :started_sharing, :liked, :reshared]) + params.fetch(:user).permit( + :email, + :current_password, + :password, + :password_confirmation, + :language, + :disable_mail, + :invitation_service, + :invitation_identifier, + :show_community_spotlight_in_stream, + :auto_follow_back, + :auto_follow_back_aspect_id, + :remember_me, + :getting_started, + email_preferences: [ + :also_commented, + :mentioned, + :comment_on_post, + :private_message, + :started_sharing, + :liked, + :reshared + ] + ) end end diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb index bc2cc59fe6e4edb0d6dccf769fef6f0e1561e18d..4aa1a32acaa2e6fe1642c1df7013265a7de4a751 100644 --- a/spec/controllers/users_controller_spec.rb +++ b/spec/controllers/users_controller_spec.rb @@ -174,6 +174,13 @@ describe UsersController do }.should change(@user.user_preferences, :count).by(-1) end end + + describe 'getting started' do + it 'can be reenabled' do + put :update, user: {getting_started: true} + @user.reload.getting_started?.should be_true + end + end end describe '#privacy_settings' do