diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 04:55:51 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-09-18 08:25:02 +0900 |
commit | 9b53f74d897d346f44caae7b0cffcd900f986259 (patch) | |
tree | 5c5bec32a5472740ea2216051b6a305a5f1b4ef3 /activerecord/lib/active_record/associations/builder | |
parent | 37be1cb47755a3d0a02eed12ac8cfb377b172f2d (diff) | |
download | rails-9b53f74d897d346f44caae7b0cffcd900f986259.tar.gz rails-9b53f74d897d346f44caae7b0cffcd900f986259.tar.bz2 rails-9b53f74d897d346f44caae7b0cffcd900f986259.zip |
Remove the code that swapping `scope` and `options`
`options` is never assigned to `scope` as long as using splat hash.
Diffstat (limited to 'activerecord/lib/active_record/associations/builder')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/association.rb | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/associations/builder/association.rb b/activerecord/lib/active_record/associations/builder/association.rb index 496b16b58f..ca3032d967 100644 --- a/activerecord/lib/active_record/associations/builder/association.rb +++ b/activerecord/lib/active_record/associations/builder/association.rb @@ -38,11 +38,6 @@ module ActiveRecord::Associations::Builder # :nodoc: def self.create_reflection(model, name, scope, options, extension = nil) raise ArgumentError, "association names must be a Symbol" unless name.kind_of?(Symbol) - if scope.is_a?(Hash) - options = scope - scope = nil - end - validate_options(options) scope = build_scope(scope, extension) |