So I want to use components so parts of my code are more modular, and
this maybe a newbie mistake, but it seems to me that if you using
components in a modular way, you can''t redirect or render anything
from your original application. Is this true or am I just overlooking
something?
Here is some code:
class Comments::CommentsController < ActionController::Base
uses_component_template_root
.......
def vote
@comment = Comment.find(params[:id])
# comment.rating += params[:rating]
if @comment.save
redirect_to :controller => ''/community'', :action
=> ''show'', :id
=> params[:design_id]
.......
end
That redirect will take me to homepage/comments/comments//community/
show/id
but I want it to take me to homepage/community/show/id
Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---