Refactor Setting (#3302)
* @object is not needed * Remove unneeded dependencies * Do not call private method * Prefer #respond_to_missing? over #respond_to? `#respond_to?` doesn't support `User.settings.method(:method_name)` * Use find_or_initialize_by instead of
This commit is contained in:
parent
2469fd1cdc
commit
08dce5e607
3 changed files with 7 additions and 12 deletions
|
@ -2,8 +2,6 @@
|
|||
|
||||
module Settings
|
||||
module Extend
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def settings
|
||||
@settings ||= ScopedSettings.new(self)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue