You are here: Browse Railsplugins Acts As Branched
Should possibly change the name of the plugin, the call is ‘acts_as_branch_leaf’ as it made more sense than acts_as_branched, as the model itself isn’t branched, it is acting as a leaf of the branched tree
Applying acts_as_branch_leaf to a model:
Todo in later versions:
Schemas:
This requires 2 models and therefor 2 tables, a branch_stems table and branchings table.
create_table :branch_stems do |t|
t.column :created_on, :datetime
end
create_table :branchings do |t|
t.column :created_on, :datetime
t.column :branch_id, :integer
t.column :leaf_id, :integer
t.column :leaf_type, :string
end
NOTE: This description has been extracted from the Plugin README and so the formatting may need updating to make browser friendly