diff options
Diffstat (limited to 'activerecord/lib/active_record/base.rb')
-rwxr-xr-x | activerecord/lib/active_record/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 68f44ef0f6..cff5fd7a42 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -2027,7 +2027,7 @@ module ActiveRecord #:nodoc: # default_scope :find => { :order => 'last_name, first_name' } # end def default_scope(options = {}) - self.default_scoping << { :find => options, :create => options.is_a?(Hash) ? options[:conditions] : {} } + self.default_scoping << { :find => options, :create => (options.is_a?(Hash) && options.has_key?(:conditions)) ? options[:conditions] : {} } end # Test whether the given method and optional key are scoped. |