Passing authentication parameters in Active Resource (Rails 3) -


i'm using: rails 3.2, mac os x mountain lion

i have active resource model:

class model < activeresource::base    self.site = "http://localhost:3000" end 

problem is, site connecting has authentication. checks parameters api_key , api_secret knows it's talking to.

my question is: how pass parameters in active resource? tried "http://api_key:api_secret@localhost:3000" way , "http://localhost:3000?api_key=1234&api_secret=1234" way both didn't work.

thanks lot.

try set user api key , password api secret:

class model < activeresource::base    self.site = "http://localhost:3000"    self.user = "1234"      # api key    self.password = "1234"  # api secret end 

Comments