Created
October 27, 2015 00:46
-
-
Save kitwalker12/0c9519d9f66a8fd108a7 to your computer and use it in GitHub Desktop.
Rails reject validations
This file contains hidden or 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 Spree | |
Address.class_eval do | |
_validators.reject!{ |key, value| key == :phone } | |
_validate_callbacks.each do |callback| | |
callback.raw_filter.attributes.reject! { |key| key == :phone } if callback.raw_filter.respond_to?(:attributes) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment