On 5 March 2010 13:18, mac <care4u.jodh...@gmail.com> wrote:
> "The create and build methods are only available for has_one/
> belongs_to if an association already exist. It will not work when it's
> nil. "

http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html

For a has_one, it seems you can user "build_<association>". So for your case:

@metadata = @content_master.build_metadata

...might do the job.

-- 
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-t...@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