Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
blog
Project
Project
Details
Activity
Releases
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
mis-21-2018-intersession
rails
blog
Commits
8a518714
Commit
8a518714
authored
Jul 02, 2018
by
John Noel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Posts new page
parent
408fffc0
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
posts_controller.rb
app/controllers/posts_controller.rb
+1
-0
new.html.erb
app/views/posts/new.html.erb
+8
-2
No files found.
app/controllers/posts_controller.rb
View file @
8a518714
...
@@ -7,6 +7,7 @@ class PostsController < ApplicationController
...
@@ -7,6 +7,7 @@ class PostsController < ApplicationController
end
end
def
new
def
new
@post
=
Post
.
new
end
end
def
edit
def
edit
...
...
app/views/posts/new.html.erb
View file @
8a518714
<h1>
Posts#new
</h1>
<h1>
New Post
</h1>
<p>
Find me in app/views/posts/new.html.erb
</p>
<%=
simple_form_for
@post
do
|
f
|
%>
<%=
f
.
input
:title
%>
<%=
f
.
input
:content
%>
<%=
f
.
button
:submit
,
"Post"
,
class:
"btn btn-primary"
%>
<%=
link_to
"Back"
,
posts_path
,
class:
"btn btn-default"
%>
<%
end
%>
\ No newline at end of file
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