>Post the new/modified code and we can have a look.

1) content_master model

class ContentMaster < ActiveRecord::Base
    has_one :metadata
end

2) metadata model:

class Metadata < ActiveRecord::Base
     belongs_to :content_master
end

3)  def new
    @content_master = ContentMaster.new
    @metadata = @content_master.metadata.build

    respond_to do |format|
      format.html # new.html.erb
      format.xml  { render :xml => @content_master }
    end
  end

4) still same error
undefined method `build' for nil:NilClass


thank you

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