# Being modular but still interacting

**URL:** <https://www.ruby-forum.com/t/being-modular-but-still-interacting/113908>\
**Category:** Rails\
**Created:** [September 6, 2007, 1:58am UTC](https://www.ruby-forum.com/t/being-modular-but-still-interacting/113908 "2007-09-06T01:58:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jables](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@Jables](https://www.ruby-forum.com/u/Jables)\
**Post date:** [September 6, 2007, 1:58am UTC](https://www.ruby-forum.com/t/being-modular-but-still-interacting/113908/1 "2007-09-06T01:58:29Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Jables](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@Jables](https://www.ruby-forum.com/u/Jables)\
**Post date:** [September 6, 2007, 1:48pm UTC](https://www.ruby-forum.com/t/being-modular-but-still-interacting/113908/2 "2007-09-06T13:48:10Z")

</div>

:controller =\> ‘/community’

should be

:controller =\> ‘community’

remove the forward slash, and you’ll be fine 😉
