# Can i call another controller rhtml

**URL:** <https://www.ruby-forum.com/t/can-i-call-another-controller-rhtml/105488>\
**Category:** Rails\
**Created:** [May 30, 2007, 12:07pm UTC](https://www.ruby-forum.com/t/can-i-call-another-controller-rhtml/105488 "2007-05-30T12:07:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [May 30, 2007, 12:07pm UTC](https://www.ruby-forum.com/t/can-i-call-another-controller-rhtml/105488/1 "2007-05-30T12:07:31Z")

</div>

hi all,  
i have creater two controller, if i want to call the second cotroller  
rhtml page from the first…  
how it will be…  
if any one knows guide me…

---

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [May 30, 2007, 1:44pm UTC](https://www.ruby-forum.com/t/can-i-call-another-controller-rhtml/105488/2 "2007-05-30T13:44:59Z")

</div>

Madhankumar Nagaraj wrote:

> hi all,  
> i have creater two controller, if i want to call the second cotroller  
> rhtml page from the first…  
> how it will be…  
> if any one knows guide me…

Hi,

It’s probably not a good idea. Note that you can define some methods in  
our application.rb, since all controllers inherit from  
ApplicationController, you will "share’ them amongst all controllers.

Regards,

---

<div class="post-metadata">

**Author:** ![madhan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/aca169/32.png) [@madhan](https://www.ruby-forum.com/u/madhan)\
**Post date:** [May 30, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/can-i-call-another-controller-rhtml/105488/3 "2007-05-30T15:32:53Z")

</div>

On 5/30/07, Jean-Etienne D. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> It’s probably not a good idea. Note that you can define some methods in  
> our application.rb, since all controllers inherit from  
> ApplicationController, you will "share’ them amongst all controllers.
> 
> Regards,
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

Well, in some cases you do want to have common views across controllers,  
though the way of accessing view files is all the same:

render “controller\_name/view”

which corresponds to:

app/views/controller\_name/view.rhtml

Jason
