Implement CSV import and conversion to contestants

This commit is contained in:
sto
2025-05-17 17:40:03 +02:00
parent 939e2157ab
commit ec2201f9a8
12 changed files with 165 additions and 17 deletions

14
app/lib/forms.rb Normal file
View File

@@ -0,0 +1,14 @@
module Forms
class CsvConversionForm
include ActiveModel::Model
include ActiveModel::Attributes
include ActiveModel::Validations::Callbacks
include ActiveRecord::Transactions
attribute :name_column, :integer
attribute :email_column, :integer
validates :name_column, presence: true
validates_numericality_of :name_column, greater_than: -1
end
end