Can i call another controller rhtml


#1

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…


#2

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,


#3

On 5/30/07, Jean-Etienne D. 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/.

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