[Rails] Re: Newbie Confusion re underscores / camel case

2009-08-07 Thread Ilan Berci
Andrew Myers wrote: > > Can anyone explain the general rules to me, or point me to somewhere > that does please? > > Many thanks, > Andrew. take a look at: ActiveSupport::CoreExtensions::String::Inflections best way is to load it up in irb and play with it's methods or look it up on the rail

[Rails] Re: Newbie Confusion re underscores / camel case

2009-08-07 Thread Marnen Laibow-Koser
Andrew Myers wrote: [...] > Can anyone explain the general rules to me, or point me to somewhere > that does please? Standard Ruby convention (should be explained, at least in part, in the Pickaxe Book). Class names (like all constants) are uppercase. Everything else is lowercase. Unless you

[Rails] Re: Newbie Confusion re underscores / camel case

2009-08-07 Thread Sijo Kg
Hi The first parameter to belongs_to is the association id So here auction_item_id being the foreign key according to convension by rails we can say belongs_to :auction_item It will be taken as auction_item_id For example you can try t.belongs_to :auction_item instead of t.intege