In my model I have:
validate :my_custom_validation
def my_custom_validation
errors.add_to_base("error message") if condition.exists?
end
I would like to add some parameters to mycustomer vaildation like so:
validate :my_custom_validation, :parameter1 => x, :parameter2 => y
How do I write the mycustomvalidation function to account for parameters?