Re: [Rails] Re: Re: accessing the field of a model that belongs to another model using dot notation

2011-02-25 Thread Colin Law
On 25 February 2011 21:02, John Merlino wrote: >> That means that in your chain of method calls, the thing before >> "image_file_name" is nil. So there is no "first" record in the >> blog_images collection... are you sure you have some associated >> images? > > Yes, in my database I have blog_imag

[Rails] Re: Re: accessing the field of a model that belongs to another model using dot notation

2011-02-25 Thread John Merlino
> That means that in your chain of method calls, the thing before > "image_file_name" is nil. So there is no "first" record in the > blog_images collection... are you sure you have some associated > images? Yes, in my database I have blog_images table with a foreign key of blog_post_id of 1. In m