diff --git a/app/controllers/tickets_controller.rb b/app/controllers/tickets_controller.rb index c0901f0..315b2ea 100644 --- a/app/controllers/tickets_controller.rb +++ b/app/controllers/tickets_controller.rb @@ -31,6 +31,6 @@ def risk_feed private def ticket_params - params.require(:ticket).permit(:id, :area_id, :entered_at, :left_at, :encrypted_data, :public_key, :accepted_privacy_policy) + params.require(:ticket).permit(:id, :area_id, :entered_at, :left_at, :cwa_checked_in, :encrypted_data, :public_key, :accepted_privacy_policy) end end diff --git a/app/models/ticket.rb b/app/models/ticket.rb index 843f7e8..8dc1a61 100644 --- a/app/models/ticket.rb +++ b/app/models/ticket.rb @@ -5,7 +5,7 @@ class Ticket < ApplicationRecord has_paper_trail on: [:update], only: [:encrypted_data] AUTO_CHECKOUT_AFTER = 4.hours - EXPOSED_ATTRIBUTES = %i[id entered_at left_at area_id company_name company_address company_location_type company_cwa_link_enabled company_auto_checkout_time area_name] + EXPOSED_ATTRIBUTES = %i[id entered_at left_at area_id company_name cwa_checked_in company_address company_location_type company_cwa_link_enabled company_auto_checkout_time area_name] enum status: { neutral: 0, at_risk: 2 } diff --git a/db/migrate/20210614144014_add_cwa_tracking_to_tickets.rb b/db/migrate/20210614144014_add_cwa_tracking_to_tickets.rb new file mode 100644 index 0000000..3bc4773 --- /dev/null +++ b/db/migrate/20210614144014_add_cwa_tracking_to_tickets.rb @@ -0,0 +1,5 @@ +class AddCwaTrackingToTickets < ActiveRecord::Migration[6.1] + def change + add_column :tickets, :cwa_checked_in, :integer + end +end