0
0
Fork 0

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:
alpaca-tc 2017-05-25 21:14:36 +09:00 committed by Eugen Rochko
parent 2469fd1cdc
commit 08dce5e607
3 changed files with 7 additions and 12 deletions

View file

@ -2,8 +2,6 @@
module Settings
module Extend
extend ActiveSupport::Concern
def settings
@settings ||= ScopedSettings.new(self)
end