# Transfering information among view and action

**URL:** <https://www.ruby-forum.com/t/transfering-information-among-view-and-action/170438>\
**Category:** Rails\
**Created:** [June 17, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/transfering-information-among-view-and-action/170438 "2009-06-17T17:11:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![moya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@moya](https://www.ruby-forum.com/u/moya)\
**Post date:** [June 17, 2009, 5:11pm UTC](https://www.ruby-forum.com/t/transfering-information-among-view-and-action/170438/1 "2009-06-17T17:11:14Z")

</div>

hi every one . i am a newbie in rails . please help me with this  
question

i have a controller named home\_page and one action inside it named index  
. in view part of this controller for index action i have a login box  
that the user must enter his user name and password to log in into the  
site .when users enters  
their user name and password and press the login button , the entered  
value for user name and password should be passed to an action named  
login in other controller named login\_manager , my question here is that  
how i can transfer the enterd value of the user name and password from  
index view of home\_page controller to the login action method of the  
login\_manager controller ?  
Please clarify it with rails code .  
thanks a lot and apologize if my question is very primitive.~~\> Moya

---

<div class="post-metadata">

**Author:** ![moya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@moya](https://www.ruby-forum.com/u/moya)\
**Post date:** [June 17, 2009, 5:22pm UTC](https://www.ruby-forum.com/t/transfering-information-among-view-and-action/170438/2 "2009-06-17T17:22:02Z")

</div>

On 17 Jun 2009, at 16:11, Mohammad Codecorona wrote:

> value for user name and password should be passed to an action named  
> login in other controller named login\_manager , my question here is  
> that  
> how i can transfer the enterd value of the user name and password from  
> index view of home\_page controller to the login action method of the  
> login\_manager controller ?

The browser submits the form contents for you, you can then pick it  
out of the params hash

Fred

---

<div class="post-metadata">

**Author:** ![moya](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3da27b/32.png) [@moya](https://www.ruby-forum.com/u/moya)\
**Post date:** [June 17, 2009, 7:27pm UTC](https://www.ruby-forum.com/t/transfering-information-among-view-and-action/170438/3 "2009-06-17T19:27:57Z")

</div>

thanks fred for your replay . but my question is that how i should write  
in my code that i want the username and password to be sent to the login  
action of another controller named login\_manager.
