B
B
Blaine_Mono2016-11-12 22:35:23
Ruby on Rails
Blaine_Mono, 2016-11-12 22:35:23

Ruby on rails output data with specific parameter?

There is an order model, the model has an active property. I need to display both all orders in general and only those that are currently active, how can I do this within the REST model?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
al_gon, 2016-11-12
@al_gon

  • for all${host}/api/rest/orders
${host}your host accordingly.

A
Anna Buyanova, 2016-11-13
@LightAlloy

All - /orders (OrdersController#index)
Active - /orders/active (OrdersController#active)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question