Skip to content
Extraits de code Groupes Projets
Valider a5d73401 rédigé par Sean Tilley's avatar Sean Tilley
Parcourir les fichiers

Merge pull request #4388 from MrZYX/4378-reenable_getting_started

whitelist getting_started as a user settable attribute
parents ed7281d7 14c78da6
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -162,6 +162,29 @@ class UsersController < ApplicationController ...@@ -162,6 +162,29 @@ class UsersController < ApplicationController
private private
def user_params 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
end end
...@@ -174,6 +174,13 @@ describe UsersController do ...@@ -174,6 +174,13 @@ describe UsersController do
}.should change(@user.user_preferences, :count).by(-1) }.should change(@user.user_preferences, :count).by(-1)
end end
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 end
describe '#privacy_settings' do describe '#privacy_settings' do
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter