Right now I am doing something like this in my controller:
def create @page = Page.new(params[:page])
links = params[:links]
if @page.save
links.each{|e| @page.links.create(:name => e[:name], :url =>
e[:url])
end
end
But I feel there must be a more intuitive way of doing this.
Basically, I want to add my links collection (from a form at /pages/new)
to the page hash and create them automatically. Is this possible?