# Params\[:data\]

**URL:** <https://www.ruby-forum.com/t/params-data/145988>\
**Category:** Rails\
**Created:** [August 15, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/params-data/145988 "2008-08-15T21:07:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [August 15, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/params-data/145988/1 "2008-08-15T21:07:21Z")

</div>

How can I get only GET or POST parameters?

If there is GET and POST then params[:data] returns GET, but I need that  
POST overwrite GET.

What I cat do?

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [August 15, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/params-data/145988/2 "2008-08-15T21:35:38Z")

</div>

Gi Ga wrote:

> How can I get only GET or POST parameters?
> 
> If there is GET and POST then params[:data] returns GET, but I need that  
> POST overwrite GET.
> 
> What I cat do?

Not sure what your cat does, but you could always (re)design your  
application around that particular behavior. 🙂

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [August 15, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/params-data/145988/3 "2008-08-15T22:01:03Z")

</div>

Daniel W. wrote:

> Not sure what your cat does, but you could always (re)design your  
> application around that particular behavior. 🙂

I make a livesearch, it works fine, but if user give a search word by  
typing it in URL, livesearch doesn’t work any more, because GET  
parameter overwrite POST (ajax updateform).

I need i way to filter GET parameters.

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [August 16, 2008, 12:14pm UTC](https://www.ruby-forum.com/t/params-data/145988/4 "2008-08-16T12:14:21Z")

</div>

afaik there is not a way to do this. I know what you’re trying to do  
(like PHP’s $\_POST and $\_GET), and in rails they’re all heaped into  
params.

---

<div class="post-metadata">

**Author:** ![giga](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/b9bd4f/32.png) [@giga](https://www.ruby-forum.com/u/giga)\
**Post date:** [August 16, 2008, 12:07pm UTC](https://www.ruby-forum.com/t/params-data/145988/5 "2008-08-16T12:07:16Z")

</div>

Help?
