On 25 February 2011 19:28, John Merlino wrote:
> post.blog_images.first.image_file_name
>
> outputs
>
> undefined method `image_file_name' for nil:NilClass
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 co
On Fri, Feb 25, 2011 at 11:28 AM, John Merlino wrote:
> post.blog_images.first.image_file_name
>
> outputs
>
> undefined method `image_file_name' for nil:NilClass
>
> I think that means I called a method on a class that it cannot find?
It means that this particular 'post' has no 'blog_images' as
Thanks for replies.
This:
post.blog_images.first.image_file_name
outputs
undefined method `image_file_name' for nil:NilClass
I think that means I called a method on a class that it cannot find? I
have already established has_many belongs_to between blog_images and
posts table.
This doesn't
3 matches
Mail list logo