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?
After looking into a way to allow an additional param to also be sent
for create and update requests, I have come across a patch that does
exactly this.
Does anyone know when this is likely to make its way into edge?
Cheers,
Scott
Scott A S wrote:
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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.