I want to start a new pet project and use the latest technology out there. For me it means Rails 3 and MongoMapper.
Iâve been trying to use the rails 3 fork which supports activemodel. However Iâm suffering from severe lack of documentation.
I has able to setup the project, but now I have some questions: does the rails 3 fork supports generations? I tried to put âg.orm :mongo_mapperâ and âg.orm :mongomapperâ without any success (it always complains that it doesnât know the ORM).
Any example out there using the rails 3 fork? Thank you for your help!
Ruben
If you're using MongoMapper, you'll sort of have to get used to the lack of documentation. I tend to have the MongoMapper library tests open in an editor at all times so I can quickly search through them for code examples. The switch to ActiveModel could potentially remove the need to document a huge chunk of functionality (like validations) since you'll be able to use a lot of the core rails docs which seems to be extremely well maintained as of late.
Really though, MongoMapper isn't a terribly complex library. Codebase is well organized and fairly easy to understand. The biggest learning curve I had to overcome was just MongoDB itself and its ruby interface. And for that 10gen has pretty excellent docs. http://www.mongodb.org/display/DOCS/Ruby+Tutorial
I'd recommend getting as familiar as possible with the MongoDB commands and the ruby driver. It makes looking into the mongomapper internals and getting it to do what you need it to do much much easier.
Best of luck
> --
> 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
On Feb 19, 2010, at 3:45 PM, Jacques Crocker wrote:
> Hi Ruben. I'm still working on getting the new generators integrated into my fork of MongoMapper at http://github.com/merbjedi/mongomapper. I'll mainly be using the ones taken from here: http://github.com/indirect/rails3-generators
>
> If you're using MongoMapper, you'll sort of have to get used to the lack of documentation. I tend to have the MongoMapper library tests open in an editor at all times so I can quickly search through them for code examples.
This is always a good advice, and after reading your email and opening mongomapper test suite, it was really a blessing :)
Thank you for your time and help, and keep up the good work!! I will keep a close watch on the rails 3 branch :)
Ruben
I saw how to get the merbjedi mongomapper working, how do I install
your generators, Jacques?
I still need to dive into the new generators in Rails3. Haven't wrapped my head around it quite yet.
Sorry, haven't integrated them yet. You might be able to install them directly from the instructions here: http://github.com/indirect/rails3-generators
I still need to dive into the new generators in Rails3. Haven't wrapped my head around it quite yet.
On Mar 6, 2010, at 8:28 AM, Eric Raslich wrote:
> On Feb 19, 10:45 am, Jacques Crocker <[email protected]> wrote:
>> Hi Ruben. I'm still working on getting the new generators integrated into my fork of MongoMapper athttp://github.com/merbjedi/mongomapper. I'll mainly be using the ones taken from here:http://github.com/indirect/rails3-generators
>>
>
> I saw how to get the merbjedi mongomapper working, how do I install
> your generators, Jacques?
>
> --
> 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 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
None yet. There are only one in the indirect repository. Really, all its doing is generating a file with the content:class ModelName  include MongoMapper::Document  key :key, String         Â Â  timestamps! Â  # Validations :::::::::::::::::::::::::::::::::::::::::::::::::::::  # validates_presence_of :attribute  # Assocations :::::::::::::::::::::::::::::::::::::::::::::::::::::  # belongs_to :model  # many :model  # one :model Â  # Callbacks :::::::::::::::::::::::::::::::::::::::::::::::::::::::  # before_craete :your_model_method  # after_create :your_model_method  # before_upate :your_model_method Âend