Sha256: 1f4a0da372dea5c322128d52187fe47cdc9e8847caa416d2c771967c9266424b

Contents?: true

Size: 298 Bytes

Versions: 3

Compression:

Stored size: 298 Bytes

Contents

require 'active_model'

require File.join(File.dirname(__FILE__), '..', 'lib/min_max_validator')

class Salary

  include ActiveModel::Validations

  attr_accessor :minimum, :maximum

  validates_with MinMaxValidator,
    fields: { min: :minimum, max: :maximum, msg: "Invalid maximum salary" }

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
min_max_validator-0.0.3 spec/salary.rb
min_max_validator-0.0.2 spec/salary.rb
min_max_validator-0.0.1 spec/salary.rb