diff options
Diffstat (limited to 'activerecord/lib/active_record/associations')
-rw-r--r-- | activerecord/lib/active_record/associations/builder/association.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/associations/builder/association.rb b/activerecord/lib/active_record/associations/builder/association.rb index 4a78a9c076..f45ab1aff4 100644 --- a/activerecord/lib/active_record/associations/builder/association.rb +++ b/activerecord/lib/active_record/associations/builder/association.rb @@ -16,12 +16,12 @@ module ActiveRecord::Associations::Builder @model = model @name = name - if options - @scope = scope - @options = options - else + if scope.is_a?(Hash) @scope = nil @options = scope + else + @scope = scope + @options = options end if @scope && @scope.arity == 0 |