Skip to content

Instantly share code, notes, and snippets.

@merbjedi
Created March 23, 2010 17:55
Show Gist options
  • Save merbjedi/341462 to your computer and use it in GitHub Desktop.
Save merbjedi/341462 to your computer and use it in GitHub Desktop.
begin
# require only what we need from newer versions of active_support (>= 3.0)
require 'active_support/core_ext/class'
require 'active_support/core_ext/object'
require 'active_support/core_ext/module'
require 'active_support/core_ext/hash'
rescue LoadError
# support older versions of active_support
require "active_support/all"
end
begin
# prefer active_model if it exists
require "active_model"
rescue LoadError
# revert back to validatable and other gems
require 'validatable'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment