Maurício Linhares wrote:
> review.created_reviews.name
>
I wasn't sure where this should all go, but I am still getting errors.
Here's what I did in script/console:
>> Book.find(1).reviews
=> [<#Review id: 2, reviewable_type: "Book", reviewable_id: 1,
create_review_user_id: 1>]
>> review.created_reviews.name
=> NameError: undefined local variable or method `review' for
#<Object:0x18fa38>
from (irb):9
If I put this in, I also get an error.
>> Book.find(1).reviews.each do |r|
?> puts review.created_reviews.name
>> end
NameError: undefined local variable or method `review' for
#<Object:0x18fa38>
from (irb):11
Clearly I'm lost and confused. Thanks for helping out this new ruby
girl.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---