Class: Angarium::Api::AttemptsController
- Inherits:
-
BaseController
- Object
- BaseController
- Angarium::Api::AttemptsController
- Defined in:
- app/controllers/angarium/api/attempts_controller.rb
Instance Method Summary collapse
-
#index ⇒ Object
GET /deliveries/:delivery_id/attempts.
Methods inherited from BaseController
Instance Method Details
#index ⇒ Object
GET /deliveries/:delivery_id/attempts
5 6 7 8 9 |
# File 'app/controllers/angarium/api/attempts_controller.rb', line 5 def index delivery = scoped_delivery(params[:delivery_id]) (delivery) render_collection(:attempts, delivery.delivery_attempts.order(created_at: :desc)) { |a| attempt_json(a) } end |