Class: Angarium::Api::AttemptsController

Inherits:
BaseController show all
Defined in:
app/controllers/angarium/api/attempts_controller.rb

Instance Method Summary collapse

Methods inherited from BaseController

#angarium_current_user

Instance Method Details

#indexObject

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])
  authorize!(delivery)
  render_collection(:attempts, delivery.delivery_attempts.order(created_at: :desc)) { |a| attempt_json(a) }
end