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 <guidi.luca@gmail.com>
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