Jon wrote:

>   def create
>     @review=Review.new(params[:review])
>     @[EMAIL PROTECTED]
thats correct syntax (if @album is a object of Album model)


> 
> i'm not sure that @[EMAIL PROTECTED] is the correct syntax, but even
> at the command line when I instantiate an object of type Review and do
> Review.album.title="GoldDigger", it says that album is an undefined

here 'Review' is not a model object ,thats a model class

and always you can't get any association with any model class (except if 
you write your own code inside of that model class)

first
@review=Review.find(id)
unless @review.album
@review.album=Album.find(id)
end
@review.album.title="GoldDigger"

> method.  The only thing I can think of is that I am missing something
> when I set up the associations.

-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to