Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VenJob
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
Mai Hoang Thai Ha
VenJob
Commits
5fa53704
Commit
5fa53704
authored
Jul 06, 2021
by
Mai Hoang Thai Ha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add association option to model
parent
78e66c7c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
app/models/job.rb
+2
-0
db/migrate/20210706020256_create_users.rb
+5
-3
No files found.
app/models/job.rb
View file @
5fa53704
class
Job
<
ApplicationRecord
belongs_to
:company
has_and_belongs_to_many
:industries
has_and_belongs_to_many
:cities
has_many
:apply_jobs
has_many
:history_jobs
has_many
:favorite_jobs
...
...
db/migrate/20210706020256_create_users.rb
View file @
5fa53704
...
...
@@ -2,17 +2,19 @@ class CreateUsers < ActiveRecord::Migration[6.1]
def
change
create_table
:users
do
|
t
|
t
.
string
:name
t
.
string
:email
t
.
string
:email
,
null:
false
t
.
string
:password_digest
t
.
string
:remember_digest
t
.
boolean
:admin
t
.
boolean
:admin
,
default:
false
t
.
string
:activation_digest
t
.
boolean
:activated
t
.
boolean
:activated
,
default:
false
t
.
datetime
:activated_at
t
.
string
:password_reset_digest
t
.
datetime
:password_reset_sent_at
t
.
timestamps
end
add_index
:users
,
:email
,
unique:
true
add_index
:user
,
:password_reset_digest
,
unique:
true
end
end
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