validates_presence_of :region, :if => [“CA”, “US”].include?(:country)
validates_presence_of :region, :if => Proc.new { |a| [“CA”,
“US”].include?(a.country) }
The top one works, but the bottom does not. Obviously the top is
easier to read, but I am just curious to why the bottom one returns
false.
Thanks