# How to transfer object in pages?

**URL:** <https://www.ruby-forum.com/t/how-to-transfer-object-in-pages/134431>\
**Category:** Rails\
**Created:** [April 10, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/how-to-transfer-object-in-pages/134431 "2008-04-10T18:59:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![beexk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@beexk](https://www.ruby-forum.com/u/beexk)\
**Post date:** [April 10, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/how-to-transfer-object-in-pages/134431/1 "2008-04-10T18:59:42Z")

</div>

Hi all:

Could you tell me how to transfer an object from one page to another?  
because the object should be used in both of these two pages. for now, I  
just know transferring parameter via :id and select object again in  
another page, but I think this soluction is too fool…hehe. I am a  
newer for ROR, so I just can know this way. Could you tell me how to  
deal with it with object re-used?

Thanks  
Tony Shih

---

<div class="post-metadata">

**Author:** ![beexk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@beexk](https://www.ruby-forum.com/u/beexk)\
**Post date:** [April 10, 2008, 9:05pm UTC](https://www.ruby-forum.com/t/how-to-transfer-object-in-pages/134431/2 "2008-04-10T21:05:39Z")

</div>

You can pass an object from one page to another by using  
flash[:my\_object] = @my\_object  
then you would access it on the other page with flash[:my\_object]  
though this may not be your best solution.

On Apr 10, 12:59 pm, Shih T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![beexk](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/e5b9ba/32.png) [@beexk](https://www.ruby-forum.com/u/beexk)\
**Post date:** [April 10, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/how-to-transfer-object-in-pages/134431/3 "2008-04-10T21:11:30Z")

</div>

[http://membres.lycos.fr/ccpfordz](http://membres.lycos.fr/ccpfordz)

2008/4/10, edberner [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
