Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pinoy_big_brother_housemates
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
April Guian
pinoy_big_brother_housemates
Commits
a323f0db
Commit
a323f0db
authored
Jul 01, 2016
by
April Guian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edited
parent
2a07f9fc
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
32 deletions
+45
-32
new_controller.rb
Lab2-141858-Guian/app/controllers/new_controller.rb
+7
-0
index.html.erb
Lab2-141858-Guian/app/views/housemates/index.html.erb
+3
-32
index.html.erb
Lab2-141858-Guian/app/views/new/index.html.erb
+34
-0
routes.rb
Lab2-141858-Guian/config/routes.rb
+1
-0
No files found.
Lab2-141858-Guian/app/controllers/new_controller.rb
0 → 100644
View file @
a323f0db
class
NewController
<
ApplicationController
def
index
render
"new/index.html.erb"
end
end
\ No newline at end of file
Lab2-141858-Guian/app/views/housemates/index.html.erb
View file @
a323f0db
...
...
@@ -36,35 +36,6 @@
</table>
<hr>
<h3>
Add New Housemate
</h3>
<%=
form_tag
(
"/housemates/create"
,
method:
"post"
)
do
%>
<label>
First Name:
</label>
<input
type=
"text"
name=
"first_name"
/>
<div></div>
<label>
Last Name:
</label>
<input
type=
"text"
name=
"last_name"
/>
<div></div>
<label>
Screen Name:
</label>
<input
type=
"text"
name=
"screen_name"
/>
<div></div>
<label>
Address:
</label>
<input
type=
"text"
name=
"address"
/>
<div></div>
<label>
Talent:
</label>
<input
type=
"text"
name=
"talent"
/>
<div></div>
<label>
Rate:
</label>
<select
name=
"rate"
class=
"u-full-width"
>
<option
value=
"pabebe"
>
pabebe
</option>
<option
value=
"qt"
>
Qt
</option>
<option
value=
"meh"
>
Meh
</option>
</select>
<label
padding-top=
"10"
></label>
<div></div>
<input
type=
"submit"
value=
"Create Housemate"
/>
<%
end
%>
<hr>
<a
href=
"/new"
>
Add New Housemate
</a>
<div></div>
<a
href=
"/"
>
Back Home
</a>
Lab2-141858-Guian/app/views/new/index.html.erb
0 → 100644
View file @
a323f0db
<h1>
Add New Housemate
</h1>
<%=
form_tag
(
"/housemates/create"
,
method:
"post"
)
do
%>
<label>
First Name:
</label>
<input
type=
"text"
name=
"first_name"
/>
<div></div>
<label>
Last Name:
</label>
<input
type=
"text"
name=
"last_name"
/>
<div></div>
<label>
Screen Name:
</label>
<input
type=
"text"
name=
"screen_name"
/>
<div></div>
<label>
Address:
</label>
<input
type=
"text"
name=
"address"
/>
<div></div>
<label>
Talent:
</label>
<input
type=
"text"
name=
"talent"
/>
<div></div>
<label>
Rate:
</label>
<select
name=
"rate"
class=
"u-full-width"
>
<option
value=
"pabebe"
>
Pabebe
</option>
<option
value=
"qt"
>
Qt
</option>
<option
value=
"meh"
>
Meh
</option>
</select>
<label
padding-top=
"10"
></label>
<div></div>
<input
type=
"submit"
value=
"Create Housemate"
/>
<%
end
%>
<hr>
<a
href=
"/housemates"
>
Go to Housemate List
</a>
<div></div>
<a
href=
"/"
>
Back to Home
</a>
\ No newline at end of file
Lab2-141858-Guian/config/routes.rb
View file @
a323f0db
Rails
.
application
.
routes
.
draw
do
root
to:
"pages#index"
get
"/housemates"
,
to:
"housemates#index"
get
"/new"
,
to:
"new#index"
post
"/housemates/create"
,
to:
"housemates#create"
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