Skip to content

Instantly share code, notes, and snippets.

@tylerhunt
Last active August 29, 2015 14:00
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 tylerhunt/11262550 to your computer and use it in GitHub Desktop.
Save tylerhunt/11262550 to your computer and use it in GitHub Desktop.
Using ActiveModel::Validations standalone.
# What I should have to do:
require 'active_model/validations'
# What I actually have to do:
require 'active_support/callbacks'
require 'active_support/concern'
require 'active_support/core_ext/module/delegation'
require 'active_model/callbacks'
require 'active_model/errors'
require 'active_model/naming'
require 'active_model/translation'
require 'active_model/validator'
require 'active_model/validations'
@tylerhunt
Copy link
Author

The dependency on active_model/errors isn't even apparent until runtime when #valid? is called.

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