aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/naming.rb
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-07-01 07:46:56 -0600
committerSean Griffin <sean@thoughtbot.com>2014-07-01 07:46:56 -0600
commitfa03fa773528da88ed7c6eb6826530423c7526b2 (patch)
tree5c9c6a35ff3409e021c4f087cb616b7171f3e78a /activemodel/lib/active_model/naming.rb
parent898bc73a53f4a4ba7695ed1cc81e3d94ab62b253 (diff)
downloadrails-fa03fa773528da88ed7c6eb6826530423c7526b2.tar.gz
rails-fa03fa773528da88ed7c6eb6826530423c7526b2.tar.bz2
rails-fa03fa773528da88ed7c6eb6826530423c7526b2.zip
Silence warning emitted in tests
The instance method `model_name` was being defined multiple times, causing a redefinition warning.
Diffstat (limited to 'activemodel/lib/active_model/naming.rb')
-rw-r--r--activemodel/lib/active_model/naming.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb
index 8cf1a191f4..86f5c96af9 100644
--- a/activemodel/lib/active_model/naming.rb
+++ b/activemodel/lib/active_model/naming.rb
@@ -216,6 +216,7 @@ module ActiveModel
module Naming
def self.extended(base) #:nodoc:
base.class_eval do
+ remove_possible_method(:model_name)
delegate :model_name, to: :class
end
end