From 7c61f5c207e771fcd2c7d6528a848db87c2df21b Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sat, 12 Mar 2016 16:30:20 +0900 Subject: Fix `warning: method redefined; discarding old female` ``` $ ARCONN=mysql2 be ruby -w -Itest test/cases/scoping/default_scoping_test.rb Using mysql2 /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/scoping/named.rb:158: warning: method redefined; discarding old female /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/scoping/named.rb:158: warning: previous definition of female was here /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/scoping/named.rb:158: warning: method redefined; discarding old male /Users/kamipo/src/github.com/rails/rails/activerecord/lib/active_record/scoping/named.rb:158: warning: previous definition of male was here ``` --- activerecord/test/models/cat.rb | 3 --- 1 file changed, 3 deletions(-) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/cat.rb b/activerecord/test/models/cat.rb index e543d3aadb..dfdde18641 100644 --- a/activerecord/test/models/cat.rb +++ b/activerecord/test/models/cat.rb @@ -3,9 +3,6 @@ class Cat < ActiveRecord::Base enum gender: [:female, :male] - scope :female, -> { where(gender: genders[:female]) } - scope :male, -> { where(gender: genders[:male]) } - default_scope -> { where(is_vegetarian: false) } end -- cgit v1.2.3