On Mar 6, 11:01 am, Manny 777 <[email protected]> wrote:

> mongo.rb
> ---------
> MongoMapper.database = "mydb"
>
> And the dates are stored in "mydb" database in a collection called
> "people". And if I see on my code, I am not see the setup of collection
> "people", where are stored dates... So the problem could be perhaps
> here... but in tutorials I am not see specific the collection, from they
> show data...
>
> Or the names of models, controllers and the collections must be the
> same?

If the model is called Testt then mongomapper will assume that the
collection is called testt (although I'm sure there is a way to
override that), much like how activerecord derives the table name from
the class name
If you renamed your class to Person, mongomapper should use the people
collection automatically. Controller name is unimportant

Fred

>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to