Kevin,

On Sun, Jul 18, 2010 at 07:50, Kevin <inspir...@gmail.com> wrote:
> It'd be nice if http://datamapper.org/docs/associations included
> mention of the name of the Resource table created, which keys/etc.  Or
> how to auto_migrate! it to get it created..  As is, its rather hard to
> actually 'get started' with it.
>

There is an actual 'Getting Started' section containing at least some
of the information you mentioned above. Definitely not all tho, we'll
see how to improve this.

> More info also about the use of :child_key, :parent_key, and :model
> options to associations.  And any other options if I'm missing them,
> its hard to find them :)
>

I just added some docs on declaring self referential many to many
relationships. You can find some information in :child_key and
:parent_key there, but I absolutely agree that this needs an own, more
prominent place.

http://datamapper.org/docs/associations

>
> As far as I can tell, there's no way to create something from a
> belongs_to or a has 1 reference.  You have to just do .new and pass
> in :model => oldmodel?
>

You can just assign a new instance of the related object to any
#belongs_to or #has(1,...) relationship. The API tries to express the
fact that there's really only *one* object at the end of that
relationship, therefore it makes sense to treat it (almost) just like
any normal property. Calling #create (to me) implies that either
you're adding to a collection (as is the case for SomeModel.create and
person.tasks.create(...)) or you're doing some kind of factory method
(close to what #new does).

> Is create_and_destroy even linked to from anywhere?  I hadn't seen it.

It's linked from http://datamapper.org/docs/ as "Creating, Saving,
Updating and Destroying records"

>
> The main 'why datamapper' page of the rdoc could use some organization
> and links to areas of the source tha tinclude more documentation (if
> any).  http://rdoc.info/projects/datamapper/dm-core

I agree, the "Why DataMapper" page needs work!

>
> Thanks for undertaking documentation updating!
>

No worries, thx for your inputs!

> --
> You received this message because you are subscribed to the Google Groups 
> "DataMapper" group.
> To post to this group, send email to datamap...@googlegroups.com.
> To unsubscribe from this group, send email to 
> datamapper+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/datamapper?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to datamap...@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to