Class: ActsAsNode::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/releaf/content/acts_as_node.rb,
lib/releaf/content/acts_as_node.rb

Class Method Summary collapse

Class Method Details

.insertObject



49
50
51
52
# File 'lib/releaf/content/acts_as_node.rb', line 49

def self.insert
  insert_into_active_record
  insert_into_action_controller
end

.insert_into_action_controllerObject



60
61
62
63
64
# File 'lib/releaf/content/acts_as_node.rb', line 60

def self.insert_into_action_controller
  if defined?(ActionController)
    ActionController::Base.send(:include, ActionController::Acts::Node)
  end
end

.insert_into_active_recordObject



54
55
56
57
58
# File 'lib/releaf/content/acts_as_node.rb', line 54

def self.insert_into_active_record
  if defined?(ActiveRecord)
    ActiveRecord::Base.send(:include, ActiveRecord::Acts::Node)
  end
end