Hi,
Is there a way to set the validate_numericality_of limit to a variable
passed in from the controller? I have this model:
class Vision < ActiveRecord::Base
belongs_to :employee
belongs_to :users
validates_numericality_of :paid_amount, :on
=> :update, :less_than_or_equal_to => 250, :allow_nil => true
validates_numericality_of :cost, :allow_nil => false
end
I’d like to use something like: :less_than_or_equal_to=> :variable
Thanks.