I have an Order model. Customers interact with the Order model through an Orders controller. Admins interact with the Order model through a Purchases controller.
Mostly it's working, except this happens:
What I really need to happen is this:
In app/controllers/purchases_controller.rb I have this:
def new
@purchase = Order.new
respond_with @purchase
end
If have tried variations like...
def new
@purchase = Order.new
respond_with @purchase, :controller => :purchases
end
...but nothing like that is documented for respond_with, and naturally it doesn't work. What can I do?
A few observations:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With