Sha256: 58c9d474c1734a4128896c65a386addfdf57b085db93c07ffc2c1ed1a89b744f
Contents?: true
Size: 528 Bytes
Versions: 1
Compression:
Stored size: 528 Bytes
Contents
require 'acts_as_tree/active_record/acts/tree' require 'acts_as_tree/version' module ActsAsTree if defined? Rails::Railtie require 'rails' class Railtie < Rails::Railtie initializer 'acts_as_tree.insert_into_active_record' do ActiveSupport.on_load :active_record do ActsAsTree::Railtie.insert end end end end class Railtie def self.insert if defined?(ActiveRecord) ActiveRecord::Base.send(:include, ActiveRecord::Acts::Tree) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
acts_as_tree-1.0.1 | lib/acts_as_tree.rb |