# Params

**URL:** <https://www.ruby-forum.com/t/params/107296>\
**Category:** Rails\
**Created:** [June 20, 2007, 8:37am UTC](https://www.ruby-forum.com/t/params/107296 "2007-06-20T08:37:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [June 20, 2007, 8:37am UTC](https://www.ruby-forum.com/t/params/107296/1 "2007-06-20T08:37:03Z")

</div>

Hallo  
I have the Problem that i give a parameter from the the Controller to  
the view and then i want to give back that Parameter from the view to  
the controller! But it doesn’t work. Please can somebody help me!

\<% form\_tag :action =\> :create do %\>

 \<%=:id =\> @house.id, params[:id], size =\> 0%\> 

| Bezeichnung | \<%= text\_field\_tag :name, params[:name], :size =\> 40 %\> | \<%= submit\_tag "HinzufÃƒÂ¼gen" %\> |

\<%end%\>

In this code i want to give back @house.id from the view to the  
controller!

Thank you

Harald

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [June 20, 2007, 8:41am UTC](https://www.ruby-forum.com/t/params/107296/2 "2007-06-20T08:41:24Z")

</div>

You should use a hidden\_tag for this. “Giving back to the controller” is  
done by posting http data to the controller.

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [June 20, 2007, 8:54am UTC](https://www.ruby-forum.com/t/params/107296/3 "2007-06-20T08:54:15Z")

</div>

\<% form\_tag :action =\> :create do %\>

 \<%= hidden\_tag :id =\> @house.id, params[:id]%\> 

| Bezeichnung | \<%= text\_field\_tag :name, params[:name], :size =\> 40 %\> | \<%= submit\_tag "HinzufÃƒÂ¼gen" %\> |

\<%end%\>

Thanks for your fast reply but when i use this hidden\_tag i get an  
error! Can somebody please show me how it works!

THANK you

Harald

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [June 20, 2007, 9:47am UTC](https://www.ruby-forum.com/t/params/107296/4 "2007-06-20T09:47:38Z")

</div>

Hallo

Please can somebody show me how it works!

THANKS

---

<div class="post-metadata">

**Author:** ![guest](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/8dc957/32.png) [@guest](https://www.ruby-forum.com/u/guest)\
**Post date:** [June 20, 2007, 10:55am UTC](https://www.ruby-forum.com/t/params/107296/5 "2007-06-20T10:55:33Z")

</div>

Hallo

I have solved my Problem but i have a Question. Is it possible to give  
with the redirect\_to also Parameters?

THANK
