Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
toy_app
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
Nguyen Hoang Mai Phuong
toy_app
Commits
7aad2c4a
Commit
7aad2c4a
authored
Jun 02, 2021
by
Nguyen Hoang Mai Phuong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish toy app
parent
805869b6
Pipeline
#1204
failed with stages
in 0 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
app/controllers/application_controller.rb
+0
-3
app/models/micropost.rb
+1
-0
app/models/user.rb
+1
-0
No files found.
app/controllers/application_controller.rb
View file @
7aad2c4a
class
ApplicationController
<
ActionController
::
Base
class
ApplicationController
<
ActionController
::
Base
def
hello
render
html:
"hello, world!"
end
end
end
app/models/micropost.rb
View file @
7aad2c4a
class
Micropost
<
ApplicationRecord
class
Micropost
<
ApplicationRecord
belongs_to
:user
validates
:content
,
length:
{
maximum:
140
}
validates
:content
,
length:
{
maximum:
140
}
end
end
app/models/user.rb
View file @
7aad2c4a
class
User
<
ApplicationRecord
class
User
<
ApplicationRecord
has_many
:microposts
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