Displaying 1 result from an estimated 1 matches for "contoller1_control".
2010 Oct 14
7
undefined method?
...i
am trying to add a comment form to the page that is rendered by that
index action.
Supposing my controller is named controller1,
I began this process first with:
rails g model comments name:string content:text
rake rb:migrate
Then I went on to define an action to create the comments:
within contoller1_controller.rb I added
=========
def new
@comment = Comments.new
respond_to do |format|
format.html
format.xml { render :xml => @comment }
end
end
========
views/controller1/new.haml contains
========
= render ''form''
========
and _form.html.erb contains
==...