mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix warning: method redefined;
This fixes the following warning: ``` /tmp/d20170727-7039-kmdtb1/app/app/models/user.rb:5: warning: method redefined; discarding old model_name rails/activemodel/lib/active_model/naming.rb:222: warning: previous definition of model_name was here ```
This commit is contained in:
parent
6f9b01c056
commit
65a1733545
1 changed files with 3 additions and 3 deletions
|
@ -293,7 +293,7 @@ module ApplicationTests
|
|||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
|
||||
def model_name
|
||||
def self.model_name
|
||||
@_model_name ||= ActiveModel::Name.new(self.class, nil, "User")
|
||||
end
|
||||
|
||||
|
@ -430,7 +430,7 @@ module ApplicationTests
|
|||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
|
||||
def model_name
|
||||
def self.model_name
|
||||
@_model_name ||= ActiveModel::Name.new(self.class, nil, "User")
|
||||
end
|
||||
|
||||
|
@ -542,7 +542,7 @@ module ApplicationTests
|
|||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
|
||||
def model_name
|
||||
def self.model_name
|
||||
@_model_name ||= ActiveModel::Name.new(self.class, nil, "User")
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue