I have route that looks like this:
/orders/preview
It returns something like:
<order><total>100</total></order>
I want to add this method to an active resource class. What is the best way to do this?
I started doing something like this:
class Order < ActiveResource::Base
def self.preview(params = {})
post(:preview, params)
end
end
This appears to work, but I get a Net::HTTP
response back rather than an Order
object. What am I doing wrong?