Skip to content

Commit e00a8a6

Browse files
committed
Fix form login
1 parent 1ee85d0 commit e00a8a6

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

app/controllers/index_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
end
2525

2626
post '/users' do
27-
p params['user']
2827
@user = User.new(params['user'])
2928
p @user
3029
if @user.save

app/views/_login.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<!-- Modal Body -->
1818
<div class="modal-body">
19-
<form id="question-form" role="form" action="/login" method="post">
19+
<form id="login-form" role="form" action="/login" method="post">
2020
<div class="form-group">
2121
<label for="email">Email</label>
2222
<input type="text" name="user[email]" class="form-control"

app/views/_register.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
<!-- Modal Body -->
1818
<div class="modal-body">
19-
<form id="question-form" role="form" action="/users" method="post">
19+
<form id="register-form" role="form" action="/users" method="post">
2020
<div class="form-group">
2121
<label for="username">Username</label>
2222
<input type="text" name="user[username]" class="form-control"

public/js/application.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ $(document).ready(function() {
1616
});
1717

1818

19+
20+
1921
$("#upvote-button").on('click', function(event){
2022
event.preventDefault();
2123
console.log(this)
@@ -58,7 +60,6 @@ $(document).ready(function() {
5860
});
5961

6062

61-
6263
$("#downvote-button").on('click', function(event){
6364
event.preventDefault();
6465
console.log(this)

0 commit comments

Comments
 (0)