Merge pull request #4388 from MrZYX/4378-reenable_getting_started
whitelist getting_started as a user settable attribute
This commit is contained in:
commit
a5d7340129
2 changed files with 31 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue