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 around. Thanks for the input, Ben
On Fri, May 29, 2009 at 11:59 AM, Luca Guidi <[email protected]> wrote: > > 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["X-TheRequiredUserKey"] = "ThisIsAReallyGreatUserKey" > end > > order = Order.create(...) > > Luca > -- > blog: www.lucaguidi.com > > > > -- ________________________________________________ Ben Hamilton http://www.benandcassandra.com http://www.linkedin.com/in/benhami ________________________________________________ If A is a success in life, then A equals x plus y plus z. Work is x; y is play; and z is keeping your mouth shut. --Einstein --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---
