Create model for users with email and password
This commit is contained in:
parent
d6500e013d
commit
6682c8c300
6 changed files with 72 additions and 14 deletions
|
|
@ -3,7 +3,14 @@
|
|||
<p class="error"><%= @error %></p>
|
||||
<% end %>
|
||||
<form action="/login" method="POST">
|
||||
<input name="email" placeholder="Email" />
|
||||
<input name="password" type="password" placeholder="Password" />
|
||||
<input type="submit" value="Log in" />
|
||||
<p>
|
||||
<label for="email">Email</label>
|
||||
<input type="text" name="email">
|
||||
</p>
|
||||
<p>
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password">
|
||||
</p>
|
||||
<button type="submit">Log in</button>
|
||||
</form>
|
||||
<a href="/signup">Create account</a>
|
||||
|
|
|
|||
13
views/signup.erb
Normal file
13
views/signup.erb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<h1>Create account</h1>
|
||||
|
||||
<form action="/signup" method="post">
|
||||
<p>
|
||||
<label for="email">Email</label>
|
||||
<input type="text" name="email">
|
||||
</p>
|
||||
<p>
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="password">
|
||||
</p>
|
||||
<button type="submit">Create account</button>
|
||||
</form>
|
||||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
<p><%= @vote.description %></p>
|
||||
|
||||
<p>Hello, <%= current_user.email %>.</p>
|
||||
|
||||
<h2>Candidates</h2>
|
||||
|
||||
<ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue