Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
parndt committed Dec 12, 2023
2 parents 99e976c + 05e99dd commit b7af987
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def update
store_user_memento

@user.roles = @selected_role_names.map { |r| Refinery::Authentication::Devise::Role[r.underscore] }
if @user.update_attributes user_params.to_h
if @user.update user_params.to_h
update_successful
else
update_failed
Expand Down
2 changes: 1 addition & 1 deletion app/models/refinery/authentication/devise/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def find_or_initialize_with_error_by_reset_password_token(original_token)
# https://github.com/plataformatec/devise/blob/v3.2.4/lib/devise/models/recoverable.rb#L45-L56
def generate_reset_password_token!
raw, enc = ::Devise.token_generator.generate(self.class, :reset_password_token)
update_attributes(
update(
:reset_password_token => enc,
:reset_password_sent_at => Time.now.utc
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
end

it "will update to the plugins supplied" do
expect(logged_in_user).to receive(:update_attributes).with({"plugins" => %w(refinery_authentication_devise some_plugin)})
expect(logged_in_user).to receive(:update).with({"plugins" => %w(refinery_authentication_devise some_plugin)})
allow(Refinery::Authentication::Devise::User).to receive_message_chain(:includes, :find) { logged_in_user }
patch :update, params: { id: logged_in_user.id.to_s, user: { plugins: %w(refinery_authentication_devise some_plugin) } }
end
Expand Down

0 comments on commit b7af987

Please sign in to comment.