Here is the class and resulting error:
class CommitFile
include MongoMapper::EmbeddedDocument
key :commit_id, ObjectId
key :filename, String
key :diff, String
key :state, String
belongs_to :commit
has_many :comments
named_scope :added, :conditions => {:state => 'added'}, :order =>
'filename'
named_scope :removed, :conditions => {:state => 'removed'}, :order
=> 'filename'
named_scope :modified, :conditions => {:state => 'modified'}, :order
=> 'filename'
end
undefined method `named_scope' for CommitFile:Class (NoMethodError)
Sent from my iPhone
On Dec 31, 2009, at 12:13 PM, "et...@ethangunderson.com" <et...@maven-soft.com
> wrote:
> --
> You received this message because you are subscribed to the Google
> Groups "MongoMapper" group.
> For more options, visit this group at
> http://groups.google.com/group/mongomapper?hl=en?hl=en
You can find named_scope in this branch:
http://github.com/mattbeedle/mongomapper/commits/master
--
On Jan 4, 5:47 pm, John Nunemaker <nunema...@gmail.com> wrote:
> I don't think that branch has any tests and is a direct port of AR which
> doesn't make sense to me. Unless it has changed since I looked at it or I'm
> thinking of something else.
>
> I have plans for named scope type stuff in MM but it will be a few releases.
>