Commit d536d37c by tady

タグを木構造に

parent ce745a30
...@@ -71,3 +71,6 @@ group :production do ...@@ -71,3 +71,6 @@ group :production do
gem 'rails_12factor' gem 'rails_12factor'
gem 'pg' gem 'pg'
end end
# tree structure
gem 'ancestry'
...@@ -32,6 +32,8 @@ GEM ...@@ -32,6 +32,8 @@ GEM
multi_json (~> 1.3) multi_json (~> 1.3)
thread_safe (~> 0.1) thread_safe (~> 0.1)
tzinfo (~> 0.3.37) tzinfo (~> 0.3.37)
ancestry (2.0.0)
activerecord (>= 3.0.0)
arel (4.0.1) arel (4.0.1)
atomic (1.1.14) atomic (1.1.14)
bcrypt-ruby (3.1.2) bcrypt-ruby (3.1.2)
...@@ -161,6 +163,7 @@ PLATFORMS ...@@ -161,6 +163,7 @@ PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
ancestry
better_errors better_errors
binding_of_caller binding_of_caller
coderay coderay
......
class AddAncestryToTags < ActiveRecord::Migration
def change
add_column :tags, :ancestry, :string
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment