mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-11 01:14:30 +08:00
Remove uneccesary save when setting notification settings on user
These methods should behave as the rest of setters on ActiveRecords, ergo setting the model state, but not saving it. The save is called at the end of the action inside the controller anyway, so this save is redundant.
This commit is contained in:
parent
c3d247faae
commit
5e90ae7383
1 changed files with 0 additions and 1 deletions
|
@ -431,7 +431,6 @@ class User < ApplicationRecord
|
|||
define_method("#{name}=") do |value|
|
||||
attr_name = name.gsub('_notification', '').to_sym
|
||||
notifications_settings[attr_name] = value
|
||||
save
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue