Skip to content

Instantly share code, notes, and snippets.

@kritik
Created November 3, 2015 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kritik/2c98b73a390c557b2d1a to your computer and use it in GitHub Desktop.
Save kritik/2c98b73a390c557b2d1a to your computer and use it in GitHub Desktop.
Fast fix her with numerical validation
module ActiveModel
module Validations
class NumericalityValidator < EachValidator # :nodoc:
private
def record_attribute_changed_in_place?(record, attr_name)
false
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment