gitlab-org--gitlab-foss/lib/gt_one_coercion.rb
2014-08-14 15:48:14 +04:00

5 lines
94 B
Ruby

class GtOneCoercion < Virtus::Attribute
def coerce(value)
[1, value.to_i].max
end
end