Skip to content

Commit

Permalink
Added a signup form
Browse files Browse the repository at this point in the history
  • Loading branch information
mhartl committed Aug 25, 2010
1 parent 8753262 commit c365270
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ def show
end

def new
@user = User.new
@title = "Sign up"
end
end
25 changes: 23 additions & 2 deletions app/views/users/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
<h1>Users#new</h1>
<p>Find me in app/views/users/new.html.erb</p>
<h1>Sign up</h1>

<%= form_for(@user) do |f| %>
<div class="field">
<%= f.label :name %><br />
<%= f.text_field :name %>
</div>
<div class="field">
<%= f.label :email %><br />
<%= f.text_field :email %>
</div>
<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password %>
</div>
<div class="field">
<%= f.label :password_confirmation, "Confirmation" %><br />
<%= f.password_field :password_confirmation %>
</div>
<div class="actions">
<%= f.submit "Sign up" %>
</div>
<% end %>
4 changes: 4 additions & 0 deletions public/stylesheets/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,8 @@ td.sidebar {
.profile img.gravatar {
border: 1px solid #999;
margin-bottom: -15px;
}

div.field, div.actions {
margin-bottom: 10px;
}

0 comments on commit c365270

Please sign in to comment.