Ensure numericality

This commit is contained in:
Justin Edmund 2025-02-11 03:06:54 -08:00
parent 65e03f62d3
commit fc90014039

View file

@ -39,6 +39,10 @@ class GridWeapon < ApplicationRecord
belongs_to :awakening, optional: true
# Validate that uncap_level and transcendence_step are present and numeric.
validates :uncap_level, presence: true, numericality: { only_integer: true }
validates :transcendence_step, presence: true, numericality: { only_integer: true }
validate :compatible_with_position, on: :create
validate :no_conflicts, on: :create