Here is my model looks like:-
Model: Movie
has_many :songs

Model: Song
belongs_to :movie

I have a songs/new form which contains song name and movie name input field.
If movie name does not exist it should create a new one else it should use
already existing one. So this I will come to know only after user enter in
movie name field.

Can I achieve this using nested attributes of rails 3?

Note: I can able to implement the same in has_many association but not in
this case.

Thanks!
Butu

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to