lib/has_constant.rb in has_constant-0.3.0 vs lib/has_constant.rb in has_constant-0.4.0
- old
+ new
@@ -1,8 +1,9 @@
require 'active_support'
-require 'has_constant/orm/mongoid' if defined?(Mongoid)
-require 'has_constant/orm/active_record' if defined?(ActiveRecord::Base)
+require 'has_constant/orm/mongoid'
+require 'has_constant/orm/active_record'
require 'active_support/inflector'
+
module HasConstant
extend ActiveSupport::Concern
# HasConstant takes a Proc containing an array of possible values for a field name
# The field name is inferred as the singular of the has constant name. For example