Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
rendezvous
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
VeNtura
rendezvous
Commits
cdaa8bda
Commit
cdaa8bda
authored
Dec 13, 2013
by
tady
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ancestry gem導入, db migrate
parent
d536d37c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
+9
-1
app/models/tag.rb
+3
-0
db/migrate/20131213005609_add_ancestry_to_tags.rb
+2
-0
db/schema.rb
+4
-1
No files found.
app/models/tag.rb
View file @
cdaa8bda
class
Tag
<
ActiveRecord
::
Base
has_many
:post_tags
has_many
:posts
,
through: :post_tags
has_ancestry
end
db/migrate/20131213005609_add_ancestry_to_tags.rb
View file @
cdaa8bda
class
AddAncestryToTags
<
ActiveRecord
::
Migration
def
change
add_column
:tags
,
:ancestry
,
:string
add_index
:tags
,
:ancestry
end
end
db/schema.rb
View file @
cdaa8bda
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20131
130184007
)
do
ActiveRecord
::
Schema
.
define
(
version:
20131
213005609
)
do
create_table
"post_tags"
,
force:
true
do
|
t
|
t
.
integer
"post_id"
,
null:
false
...
...
@@ -35,8 +35,11 @@ ActiveRecord::Schema.define(version: 20131130184007) do
t
.
string
"name"
t
.
datetime
"created_at"
t
.
datetime
"updated_at"
t
.
string
"ancestry"
end
add_index
"tags"
,
[
"ancestry"
],
name:
"index_tags_on_ancestry"
create_table
"users"
,
force:
true
do
|
t
|
t
.
string
"name"
t
.
string
"image_url"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment