Browse files

Silence warning emitted in tests

The instance method `model_name` was being defined multiple times,
causing a redefinition warning.
  • Loading branch information...
1 parent 898bc73 commit fa03fa773528da88ed7c6eb6826530423c7526b2 @sgrif sgrif committed Jul 1, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 activemodel/lib/active_model/naming.rb
@@ -216,6 +216,7 @@ def _singularize(string, replacement='_')
module Naming
def self.extended(base) #:nodoc:
base.class_eval do
+ remove_possible_method(:model_name)
delegate :model_name, to: :class

0 comments on commit fa03fa7

Please sign in to comment.