diff --git a/app/models/unit.rb b/app/models/unit.rb index 073603c..6aa486e 100644 --- a/app/models/unit.rb +++ b/app/models/unit.rb @@ -13,7 +13,7 @@ class Unit < ApplicationRecord length: {maximum: type_for_attribute(:symbol).limit} validates :description, length: {maximum: type_for_attribute(:description).limit} validates :multiplier, numericality: {equal_to: 1}, unless: :base - validates :multiplier, numericality: {other_than: 0, precision: true, scale: true}, if: :base + validates :multiplier, numericality: {greater_than: 0, precision: true, scale: true}, if: :base scope :defaults, ->{ where(user: nil) } scope :defaults_diff, ->{ diff --git a/app/views/units/_form.html.erb b/app/views/units/_form.html.erb index d298d63..033507f 100644 --- a/app/views/units/_form.html.erb +++ b/app/views/units/_form.html.erb @@ -11,7 +11,7 @@