From 577058fe81fc86fbfd9e9978a2babdbabf924545 Mon Sep 17 00:00:00 2001 From: Joey Ruzevich Date: Thu, 28 Mar 2019 16:28:12 -0500 Subject: [PATCH 1/2] first push of branch --- app/controllers/requests_controller.rb | 4 ++++ 1 file changed, 4 insertions(+) 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") From 00d09e6d2815ba466f819dc5f874329db7268602 Mon Sep 17 00:00:00 2001 From: Joey Ruzevich Date: Thu, 28 Mar 2019 16:51:02 -0500 Subject: [PATCH 2/2] Added new status 'started' to request.rb --- app/models/request.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, _|