Many Changes: Rename privacy_policy, fixed seed.rb, fixed status in migration file, created new job for operator
This commit is contained in:
@@ -4,11 +4,10 @@ class Job < ApplicationRecord
|
||||
|
||||
has_one_attached :pdf, dependent: :purge
|
||||
|
||||
validates_presence_of :costumer_firstname, :costumer_lastname, :privacy_policy_accepted, :pdf
|
||||
# validates_numericality_of {:number_of_plans_a0,:number_of_plans_a1, :number_of_plans_a2, :number_of_plans_a3}, greater_than_or_equal_to: 0
|
||||
validates_presence_of :costumer_firstname, :costumer_lastname, :pdf
|
||||
validates :privacy_policy, acceptance: true, unless: :created_by_operator?
|
||||
validates :number_of_plans_a0, :number_of_plans_a1, :number_of_plans_a2, :number_of_plans_a3, numericality: { greater_than_or_equal_to: 0 }
|
||||
|
||||
|
||||
validate :acceptable_pdf
|
||||
|
||||
before_save :update_printed_at, if: :will_save_change_to_status?
|
||||
|
||||
Reference in New Issue
Block a user