Dan,

Most of the documentation is in the same page you mention. Although it
explains in detail all options you can use when calling: Model.all

Model.get(id) will get you a single record from the database
Model.first will get you the first record from the database... or depending
if there's a default scope defined, the first record this scope returns
Model.last will get you the last record from the database... or depending
if there's a default scope defined, the last record this scope returns

Both :first and :last can be used with a scope defined in your model to
retrieve either the first or last record from that specific collection.


On Fri, Apr 18, 2014 at 2:09 PM, Dan Tenenbaum <danda...@gmail.com> wrote:

> Hello,
>
> The page at
>
> http://datamapper.org/docs/find.html
>
> says:
>
> "The finder methods for DataMapper objects are defined in
> DataMapper::Repository. They include #get, #all, #first, #last"
>
> with a link to
>
> http://rubydoc.info/github/datamapper/dm-core/master/DataMapper/Repository
>
> However, on that page, there is no documentation for anything with the
> specified names.
>
> And using the search box to search for methods called 'find' returns no
> exact matches.
>
> Where's the documentation I'm looking for?
>
> Thanks,
> DAn
>
>  --
> You received this message because you are subscribed to the Google Groups
> "DataMapper" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to datamapper+unsubscr...@googlegroups.com.
> To post to this group, send email to datamapper@googlegroups.com.
> Visit this group at http://groups.google.com/group/datamapper.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to datamapper+unsubscr...@googlegroups.com.
To post to this group, send email to datamapper@googlegroups.com.
Visit this group at http://groups.google.com/group/datamapper.
For more options, visit https://groups.google.com/d/optout.

Reply via email to