-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
ActiveRecord uses the default_scope in the new and create operation by default, but Mongoid does not. Is this intended, or should it behave the same way than ActiveRecord?
From ActiveRecord's documentation :
>The default_scope is also applied while creating/building a record. It is not applied while updating a record.
class Article < ActiveRecord::Base default_scope where(:published => true) end > Article.new.published # => true Article.create.published # => true