Skip to content

Instantly share code, notes, and snippets.

@kitwalker12
Created October 27, 2015 00:46
Show Gist options
  • Save kitwalker12/0c9519d9f66a8fd108a7 to your computer and use it in GitHub Desktop.
Save kitwalker12/0c9519d9f66a8fd108a7 to your computer and use it in GitHub Desktop.
Rails reject validations
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