Sha256: a88cdcdbd64d1dc82b9e8787959bd7767b4de22c1ba3cf5fafd960c043f5d915

Contents?: true

Size: 998 Bytes

Versions: 20

Compression:

Stored size: 998 Bytes

Contents

require "rails"
require 'testing/rspec'

# Power Enum allows you to treat instances of your ActiveRecord models as
# though they were an enumeration of values. It allows you to cleanly solve
# many of the problems that the traditional Rails alternatives handle poorly
# if at all. It is particularly suitable for scenarios where your Rails
# application is not the only user of the database, such as when it's used for
# analytics or reporting.
class PowerEnum < Rails::Engine
  config.autoload_paths << File.expand_path(File.join(__FILE__, "../"))

  initializer 'power_enum' do
    ActiveSupport.on_load(:active_record) do
      include PowerEnum::Enumerated
      include PowerEnum::HasEnumerated
      include PowerEnum::Reflection

      ActiveRecord::ConnectionAdapters.module_eval do
        include PowerEnum::Schema::SchemaStatements
      end

      ActiveRecord::Migration::CommandRecorder.class_eval do
        include PowerEnum::Migration::CommandRecorder
      end
    end

  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
power_enum-2.10.0 lib/power_enum.rb
power_enum-2.9.1 lib/power_enum.rb
power_enum-2.9.0 lib/power_enum.rb
power_enum-2.8.0 lib/power_enum.rb
power_enum-2.7.1 lib/power_enum.rb
power_enum-2.7.0 lib/power_enum.rb
power_enum-2.6.0 lib/power_enum.rb
power_enum-2.5.0 lib/power_enum.rb
power_enum-2.4.0 lib/power_enum.rb
power_enum-2.3.0 lib/power_enum.rb
power_enum-2.2.0 lib/power_enum.rb
power_enum-1.4.0 lib/power_enum.rb
power_enum-2.1.0 lib/power_enum.rb
power_enum-2.0.2 lib/power_enum.rb
power_enum-1.3.4 lib/power_enum.rb
power_enum-2.0.1 lib/power_enum.rb
power_enum-2.0.0 lib/power_enum.rb
power_enum-2.0.0.rc lib/power_enum.rb
power_enum-1.3.3 lib/power_enum.rb
power_enum-1.3.2 lib/power_enum.rb