Awesome, this did indeed fix the problem!

However, I didn't write the format code - this code was generated with:

rails g scaffold_controller Lessons

Which leads me to believe that this is the proper format code....3.0.1 
generates "format.html {filename}.html.erb" for each controller function 
- is this a generator bug, or do I have a problem with my system?

Walter Davis wrote in post #960032:
> Just drop the index.html.erb part so your block looks like this:
>
> respond_to do |format|
>    format.html
>    format.xml { render :xml => @lessons }
> end
>
> index.html.erb will already be inferred from the action name, and if
> you do want to set it to something different, you would say
>
> respond_to do |format|
>    format.html { render :template => '/foo/bar' }
>    format.xml { render :xml => @lessons }
> end
>
> Walter

-- 
Posted via http://www.ruby-forum.com/.

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