Create a gist now

Instantly share code, notes, and snippets.

require 'active_model'
class Validatable
include ActiveModel::Validations
validates_with PirateValidator
end
@jeffkreeftmeijer
Owner

Don't want to load up spec/rails/extensions? Put validations.rb in your support directory and require 'support/validations' instead. It saves me ~ 2 seconds. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment