# Two fields for same

**URL:** <https://www.ruby-forum.com/t/two-fields-for-same/191834>\
**Category:** Rails\
**Created:** [July 19, 2010, 4:11pm UTC](https://www.ruby-forum.com/t/two-fields-for-same/191834 "2010-07-19T16:11:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luciano\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/53a042/32.png) [@Luciano\_S](https://www.ruby-forum.com/u/Luciano_S)\
**Post date:** [July 19, 2010, 4:11pm UTC](https://www.ruby-forum.com/t/two-fields-for-same/191834/1 "2010-07-19T16:11:39Z")

</div>

hello guys,  
it’s possible pass two params in a GET request to the same location in  
the  
database?

example:

two fields in view:  
text\_field: persons,: Birthday: id =\> one  
text\_field: persons,: Birthday: id =\> two

in the controller using params [: one] and params [: two]

?

thank’s.

---

<div class="post-metadata">

**Author:** ![Luciano\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/53a042/32.png) [@Luciano\_S](https://www.ruby-forum.com/u/Luciano_S)\
**Post date:** [July 19, 2010, 8:41pm UTC](https://www.ruby-forum.com/t/two-fields-for-same/191834/2 "2010-07-19T20:41:02Z")

</div>

Yes, it is possible… just look at the form helper documentation at

> **[ActionView::Helpers::FormHelper](https://api.rubyonrails.org/classes/ActionView/Helpers/FormHelper.html)**
>
> Form helpers are designed to make working with resources much easier compared to using vanilla HTML.

On Mon, Jul 19, 2010 at 7:39 PM, Luciano S.  
[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)wrote:

> in the controller using params [: one] and params [: two]  
> removed\_email\_address@domain.invalid[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> .  
> For more options, visit this group at  
> [http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

–  
~N a r e n

---

<div class="post-metadata">

**Author:** ![Luciano\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/53a042/32.png) [@Luciano\_S](https://www.ruby-forum.com/u/Luciano_S)\
**Post date:** [July 19, 2010, 8:47pm UTC](https://www.ruby-forum.com/t/two-fields-for-same/191834/3 "2010-07-19T20:47:22Z")

</div>

Luciano S. wrote:

> hello guys,  
> it’s possible pass two params in a GET request to the same location in  
> the  
> database?
> 
> example:
> 
> two fields in view:  
> text\_field: persons,: Birthday: id =\> one  
> text\_field: persons,: Birthday: id =\> two
> 
> in the controller using params [: one] and params [: two]
> 
> ?
> 
> thank’s.

You can process the params hash any way you like. But what’s your use  
case like? There may be a better way…

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
