Sha256: 3f3cb09313b19ae53639389c3758d3b724e14c30c73b710bf878a9a7d8f2521d

Contents?: true

Size: 575 Bytes

Versions: 7

Compression:

Stored size: 575 Bytes

Contents

ActiveRecord::Base.class_exec do
  extend ActsAsRecursiveTree::ActsMacro
end

class Node < ActiveRecord::Base
  acts_as_tree
  has_one :node_info
end

class NodeInfo < ActiveRecord::Base
  belongs_to :node
end

class NodeWithPolymorphicParent < ActiveRecord::Base
  acts_as_tree parent_key: :other_id, parent_type_column: :other_type
end


class NodeWithOtherParentKey < ActiveRecord::Base
  acts_as_tree parent_key: :other_id
end

class Location < ActiveRecord::Base
  acts_as_tree
end

class Building < Location

end

class Floor < Location

end

class Room < Location

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
acts_as_recursive_tree-2.2.1 spec/db/models.rb
acts_as_recursive_tree-2.2.0 spec/db/models.rb
acts_as_recursive_tree-2.1.1 spec/db/models.rb
acts_as_recursive_tree-2.1.0 spec/db/models.rb
acts_as_recursive_tree-2.0.2 spec/db/models.rb
acts_as_recursive_tree-2.0.1 spec/db/models.rb
acts_as_recursive_tree-2.0.0 spec/db/models.rb