Skip to content

Commit 1e9a3d9

Browse files
committed
Merge pull request #1 from zlw/master
Typo in documentation, which didn't properly pluralize the hierarchies table.
2 parents 94342e7 + 891606c commit 1e9a3d9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,19 @@ Note that closure_tree is being developed for Rails 3.1.0.rc1
3535
"_hierarchy". Note that by calling ```acts_as_tree```, a "virtual model" (in this case, ```TagsHierarchy```) will be added automatically, so you don't need to create it.
3636

3737
```ruby
38-
class CreateTagHierarchy < ActiveRecord::Migration
38+
class CreateTagHierarchies < ActiveRecord::Migration
3939
def change
40-
create_table :tags_hierarchy, :id => false do |t|
40+
create_table :tags_hierarchies, :id => false do |t|
4141
t.integer :ancestor_id, :null => false # ID of the parent/grandparent/great-grandparent/... tag
4242
t.integer :descendant_id, :null => false # ID of the target tag
4343
t.integer :generations, :null => false # Number of generations between the ancestor and the descendant. Parent/child = 1, for example.
4444
end
4545
4646
# For "all progeny of..." selects:
47-
add_index :tags_hierarchy, [:ancestor_id, :descendant_id], :unique => true
47+
add_index :tags_hierarchies, [:ancestor_id, :descendant_id], :unique => true
4848
4949
# For "all ancestors of..." selects
50-
add_index :tags_hierarchy, [:descendant_id]
50+
add_index :tags_hierarchies, [:descendant_id]
5151
end
5252
end
5353
```

0 commit comments

Comments
 (0)