Re: [Rails] Question regarding associations..

2011-07-29 Thread Rick & Nellie Flower
daries) whereas the more widely >> recognized Ruby convention is to use all_lower_case_with_underscores. I >> left your variable names as-is in the sample code above, but if it's code >> that anyone else will ever see or work on, you might consider changing it. >>

Re: [Rails] Question regarding associations..

2011-07-29 Thread Rick & Nellie Flower
o figure out what you're attempting to do if you give > it some basic instructions and if what you want to do isn't too complicated. > > On Fri, Jul 29, 2011 at 8:35 AM, Rick & Nellie Flower > wrote: > Thanks for the reply Chris.. > > I'll switch away from

Re: [Rails] Question regarding associations..

2011-07-28 Thread Rick & Nellie Flower
WithCapitalsIndicatingWordBoundaries) whereas the more widely > recognized Ruby convention is to use all_lower_case_with_underscores. I left > your variable names as-is in the sample code above, but if it's code that > anyone else will ever see or work on, you might consider changi

Re: [Rails] Question regarding associations..

2011-07-28 Thread Rick & Nellie Flower
Ok.. Still working on this stuff.. I've got the t.reference in the migration for the address class and moved the belongs_to and has_one in the model classes as indicated (I didn't notice that!). I noticed in the association-basics that I should be putting a create_table function (if that's what

Re: [Rails] Question regarding associations..

2011-07-28 Thread Rick & Nellie Flower
iles, so there's no way of knowing whether you've > defined the relationships there. > > See: > http://guides.rubyonrails.org/migrations.html > http://guides.rubyonrails.org/association_basics.html > > On Thu, Jul 28, 2011 at 8:53 AM, Rick & Nellie Flower >

[Rails] Question regarding associations..

2011-07-27 Thread Rick & Nellie Flower
Ok.. So I've got my initial table structures setup and I was hoping I could have associations help me out with something akin to embedded/nested objects but without the direct nesting (unless there's another way to achieve that goal).. So, I've got an Address class that looks like the following

Re: [Rails] Re: Newbie question..

2011-07-26 Thread Rick & Nellie Flower
On Tue, 26 Jul 2011 09:11:53 -0700 (PDT), Frederick Cheung wrote: On Jul 26, 5:06 pm, Rick & Nellie Flower wrote: > Sounds like you want either validates_with, which enables you to > package up  a set of validations into something reusable or > validates_associated, which would t

Re: [Rails] Re: Newbie question..

2011-07-26 Thread Rick & Nellie Flower
On Tue, 26 Jul 2011 05:37:42 -0700 (PDT), Frederick Cheung wrote: On Jul 26, 6:20 am, Rick F wrote: [ snipped ] So -- is this sort of compound objecting possible in Rails or should I just eliminate the first two classes and add their respective fields directly into Users? Sounds like you