Created
November 3, 2015 12:12
-
-
Save kritik/2c98b73a390c557b2d1a to your computer and use it in GitHub Desktop.
Fast fix her with numerical validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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