So I am just learning RoR and how I learn best is to come up with a problem and use another language to accomplish this. So I decided to do "Digg" type of site where people post a comment and people respond. So in my controller I have an action called
view_comments,
view_comments takes several parameters to view the page. params[:comment][:ptype_id], params[:user][:id]
While persisting a comment, I would like the user to be redirected back to view_comments. However I have tried to pass parameters to redirect_to and render and none have worked.
What would that look like?
if @comment.save flash[:notice] = 'Comment was successfully created. ' redirect_to :action => 'view_comments', ??? else render :action => 'new' end
Thank you in advance.