# ActiveResource, how to add a param to every request?

**URL:** <https://www.ruby-forum.com/t/activeresource-how-to-add-a-param-to-every-request/130133>\
**Category:** Rails\
**Created:** [February 25, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/activeresource-how-to-add-a-param-to-every-request/130133 "2008-02-25T18:03:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ss\_1982](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/96bed5/32.png) [@ss\_1982](https://www.ruby-forum.com/u/ss_1982)\
**Post date:** [February 25, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/activeresource-how-to-add-a-param-to-every-request/130133/1 "2008-02-25T18:03:38Z")

</div>

Hi,

I have just created a couple of ActiveResource classes that are being  
used to communicate with a rest api.

In every request I am having to place an api key as an additional param  
e.g.  
@book = Book.find(params[:id], :params =\> {:key =\>  
‘7348d92f82836eb9d5f69c0’})

Is anyone aware of a dryâ€™er solution that will allow me define the  
additional param in the class below self.site or something similar?

Thanks,  
Scott
