# One view, many actions

**URL:** <https://www.ruby-forum.com/t/one-view-many-actions/119997>\
**Category:** Rails\
**Created:** [November 12, 2007, 8:02pm UTC](https://www.ruby-forum.com/t/one-view-many-actions/119997 "2007-11-12T20:02:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![infiliset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a9adbd/32.png) [@infiliset](https://www.ruby-forum.com/u/infiliset)\
**Post date:** [November 12, 2007, 8:02pm UTC](https://www.ruby-forum.com/t/one-view-many-actions/119997/1 "2007-11-12T20:02:01Z")

</div>

Hi all,  
I’ve got a view named "prompt.rhtml"and a controller named “customer”  
with some actions (“prompt”, “getdata”, and so on…). Of course, the  
URL “/customer/prompt” is associated to the action “prompt” and then  
to the view “prompt.rhtml”, but is it possible, when the URL is  
“/customer/getdata”, to associate the action “getdata”  
with the view “prompt.rhtml”? If so, how can I do this?

It should be like this: getdata (action) -\> prompt.rhtml (view)…

Tanks,  
Matthew

---

<div class="post-metadata">

**Author:** ![infiliset](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/a9adbd/32.png) [@infiliset](https://www.ruby-forum.com/u/infiliset)\
**Post date:** [November 12, 2007, 8:12pm UTC](https://www.ruby-forum.com/t/one-view-many-actions/119997/2 "2007-11-12T20:12:32Z")

</div>

You could call this:

render :action =\> ‘prompt’

to render the entire ‘prompt’ action – inside your definition for  
‘getdata’. I’m not sure how to get it to just use the same view file,  
though.

If anyone else has a solution, jump on in, I’m interested too.

Regards,  
Edd

On Nov 12, 2007 7:01 PM, Infiliset [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Tanks,  
> Matthew
> 
> >

–  
Edd Morgan  
[http://www.eddm.co.uk](http://www.eddm.co.uk)  
+44 (0) 7805 089097
