From 6a037774be32c7f882ed2c1386c19bf38782bde3 Mon Sep 17 00:00:00 2001 From: moveson Date: Thu, 19 Dec 2024 22:59:49 -0700 Subject: [PATCH] Lotteries::Calculations::Base needs a gender enum --- app/models/lotteries/calculations/base.rb | 6 ++++++ app/parameters/lottery_parameters.rb | 1 + 2 files changed, 7 insertions(+) diff --git a/app/models/lotteries/calculations/base.rb b/app/models/lotteries/calculations/base.rb index ce3906fda..e2d736a82 100644 --- a/app/models/lotteries/calculations/base.rb +++ b/app/models/lotteries/calculations/base.rb @@ -5,6 +5,12 @@ class Lotteries::Calculations::Base < ApplicationRecord self.abstract_class = true + enum gender: { + male: 0, + female: 1, + nonbinary: 2, + } + pg_search_scope :person_search, associated_against: { person: [:first_name, :last_name, :city, :state_name, :country_name] diff --git a/app/parameters/lottery_parameters.rb b/app/parameters/lottery_parameters.rb index d235fe52f..cf3477909 100644 --- a/app/parameters/lottery_parameters.rb +++ b/app/parameters/lottery_parameters.rb @@ -3,6 +3,7 @@ class LotteryParameters < BaseParameters def self.permitted [ + :calculation_class, :concealed, :id, :name,