Skip to content

Commit

Permalink
minor edits
Browse files Browse the repository at this point in the history
  • Loading branch information
nhiquach committed Feb 23, 2018
1 parent 00ab9ee commit f04caca
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
9 changes: 9 additions & 0 deletions app/controllers/teachers_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ def new

def create
# Hint: params??

# YOUR CODE HERE


# This line is explicitly declaring that this controller method should render/serve the
# 'views/teachers/show.html.erb' view. Otherwise, the controller would try to look for a
# 'views/teachers/create.html.erb' view file which we do not have.
# By convention, create is associated with a POST/PUT method while show is associated with the GET HTTP method
# so the result after a "create" (C in CRUD) is a show.
render 'show'
end
end
12 changes: 6 additions & 6 deletions app/views/teachers/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<div>
<h2>Your form inputs</h2>
<h4>Full name</h4>
<h3>
<p>
<%= @full_name %>
</h3>
</p>
<h4>Course</h4>
<h3>
<p>
<%= @course %>
</h3>
</p>
<h4>Grade level</h4>
<h3>
<p>
<%= @grade_level %>
</h3>
</p>
</div>

0 comments on commit f04caca

Please sign in to comment.