[Rails-core] Re: ActiveResource connection.post custom headers

2009-06-01 Thread Ben Hamilton
I'll try that out. It looks like I may have a design flaw because I have that code in an unrelated model. I'll move the method into an Order model instead of the User model where it is now (User.place_order) - still learning both the code and the methodology. I'll repost after I've moved things ar

[Rails-core] Re: ActiveResource connection.post custom headers

2009-05-29 Thread Luca Guidi
Hi Ben, I guess you are going to create an order on the remote service, why don't you use ActiveResource in the following way? class Order < ActiveResource::Base self.site = "http://api.example.com"; headers["X-TheRequiredApplicationKey"] = "ThisIsAReallyGreatApplicationKey" headers["