[Rails]

Craig White craigwhite at azapple.com
Sun Apr 16 03:38:18 GMT 2006


On Sun, 2006-04-16 at 04:15 +0200, Will Jessup wrote:
> Craig- thanks, all I needed was the "=" (omfg).
> 
> Tom, yea that's not the problem.
> 
> 
> I was thinking, though - if you put has_many: and belongs_to, shouldn't 
> the auto-scaffold know to connect those things automagically (including 
> creating select boxes) in the list/edit/new ? or is that too much 
> automation?
> 
> 2nd -
> <%= item.category.name %>
> 
> I had the "C" capitalized because that's how it is in the model, i'm not 
> sure what the standard is. Also, has_many is plural and belongs_to is 
> singular. this is normal right? as in- not every association in the 
> model is either singular/plural, but depending on context (that's what 
> i'm doing now, just double checking)
----
I neglected to comment on singular/plural.

It is the natural context that defines the 'defaults'.

has_many :plural
has_one  :singular

Class & model refer to a single record. 

Craig



More information about the Rails mailing list