diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-03-12 16:30:20 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-03-12 17:06:43 +0900 |
commit | 7c61f5c207e771fcd2c7d6528a848db87c2df21b (patch) | |
tree | abdb6eb51f6a1aef35756bc3e7b9c6a200d27065 /activerecord | |
parent | 9201030320d09bb2ec76a7cc59aa58f77f984995 (diff) | |
download | rails-7c61f5c207e771fcd2c7d6528a848db87c2df21b.tar.gz rails-7c61f5c207e771fcd2c7d6528a848db87c2df21b.tar.bz2 rails-7c61f5c207e771fcd2c7d6528a848db87c2df21b.zip |
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
```
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/test/models/cat.rb | 3 |
1 files changed, 0 insertions, 3 deletions
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 |