def get_by_id person_id
return LinkedInModels::Person.all('_id' => person_id).first
end
Is the same as just calling
Person.find(the_id)
Also, if you want the first of something:
Person.first(:foo => value)
Finally, gem uninstall mongo_ext. It was renamed bson_ext a few months back. You should have mongo, bson, bson_ext and mongo_mapper gems.
Jamie
Docs are sparse, but if you look at the tests, you'll find what you need.
Jamie
> --
> 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
Thanks for several tips on retrieving, much nicer.
I am not sure what it was exactly, but your suggestions alone where
not enough, but I managed to get it fixed. Unfortunately I don't know
how :(
-Mark
--
Mark Nijhof
m: 0047 95 00 99 37
e: mark....@cre8ivethought.com
b: cre8ivethought.com/blog/index
"Walking on water and developing software from a specification are
easy if both are frozen."
-- Edward V Berard