Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (19 sloc) 0.836 kb
# Copyright (c) 2005 Trevor Squires
# Released under the MIT License. See the LICENSE file for more details.
require 'active_record/acts/enumerated'
require 'active_record/aggregations/has_enumerated'
ActiveRecord::Base.class_eval do
include ActiveRecord::Acts::Enumerated
include ActiveRecord::Aggregations::HasEnumerated
# Virtual enumerations are useful if you've got a ton of different
# enumerations and don't care to litter your models directory with them.
# It's also handy if you want to define singleton methods for your
# enumerated values.
# See virtual_sample.txt in this directory for more info
if File.exist?("#{RAILS_ROOT}/config/virtual_enumerations.rb")
require 'active_record/virtual_enumerations'
silence_warnings do
eval("#{RAILS_ROOT}/config/virtual_enumerations.rb"), binding)
Jump to Line
Something went wrong with that request. Please try again.