diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 0abb3a9fc0..ddf49ff7b3 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -15,6 +15,10 @@ def show # Clicking the "Fullfill" button will set the the request to fulfilled # and will move the user to the new distribution page with a # pre-filled distribution containing all the requested items. + + +#Add here + def fullfill request = Request.find(params[:id]) request.update(status: "Fulfilled") diff --git a/app/models/request.rb b/app/models/request.rb index e426e153b8..a1e4f4a68e 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -20,7 +20,7 @@ class Request < ApplicationRecord scope :active, -> { where(status: "Active") } - STATUSES = %w[Active Fulfilled].freeze + STATUSES = %w[Active Started Fulfilled].freeze def items_hash @items_hash ||= request_items.collect do |key, _|