In my Ruby on Rails application

I have a page Aboutus - This has a Controller and View. Has no model.

I have a Comments model (generated by the rails generate scaffold
comment) - This has a Controller, view, model

On my Aboutus page, I want to show the "Comments" from the comments
model, so I am thinking of using the Comments index action (to list
comments) and new action (to create new comments) on my Aboutus page.

I am having trouble getting this right.

This is what I did: Aboutus controller, I added
redirect_to :controller => "comments", :action => "index"

Aboutus views, I added
<%= render 'comments/index' %>

It doesnt work, gives me Undefined redirect_to and nil object @comments
errors. Could you advise me
1. A proper way to do this
2. Syntax
3. Any thing to do to config.rb ?

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