Sha256: 63f90939a98bcac5d215de051ba0b7431f470bd4e8819c441e9108b0497a1354

Contents?: true

Size: 615 Bytes

Versions: 1

Compression:

Stored size: 615 Bytes

Contents

# encoding: utf-8
require 'awesome_nested_set'

module CollectiveIdea
  module Acts
    module NestedSet
      if defined? Rails::Railtie
        require 'rails'
        class Railtie < Rails::Railtie
          config.before_initialize do
            ActiveSupport.on_load :active_record do
              ActiveRecord::Base.send(:include, CollectiveIdea::Acts::NestedSet::Base)
            end
            
            if Object.const_defined?("ActionView")
              ActionView::Base.send(:include, CollectiveIdea::Acts::NestedSet::Helper)
            end
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rd_awesome_nested_set-1.4.4 lib/awesome_nested_set/railtie.rb