<h1>Join &#8212; Create An Account</h1>
<div class="form">
	<%= error_messages_for :user -%>
	
	<fieldset>
    <% if admin? %>
    <legend>New user details</legend>
    <% else %>
		<legend>Your details</legend>
		<% end %>
		<% form_for :user, :url => { :action => "create" } do |form| %>
			<div>
				<%= form.label :name %>:<br />
				<%= form.text_field :name, :class => "short" %>
			</div>
			<div>
				<%= form.label :email %>:<br />
				<%= form.text_field :email, :class => "short" %><br />
				<small>Kept under lock and key. We hate spam too!</small>
			</div>
			<div>
				<%= form.label :password %>:<br />
				<%= form.password_field :password, :class => "short" %>
			</div>
			<div>
				<%= form.label :password_confirmation %>:<br />
				<%= form.password_field :password_confirmation,
				 						:class => "short" %>
			</div>
			
			<%= submit_tag "Join!" %>
		<% end %>
	</fieldset>
</div>

<h1>Join &#8212; Create An Account</h1>
<div class="form">
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

	<fieldset>
    <% if admin? %>
    <legend>New user details</legend>
    <% else %>
		<legend>Your details</legend>
		<% end %>
		<% form_for :user, :url => { :action => "create" } do |form| %>
			<div>
				<%= form.label :name %>:<br />
				<%= form.text_field :name, :class => "short" %>
			</div>
			<div>
				<%= form.label :email %>:<br />
				<%= form.text_field :email, :class => "short" %><br />
				<small>Kept under lock and key. We hate spam too!</small>
			</div>
			<div>
				<%= form.label :password %>:<br />
				<%= form.password_field :password, :class => "short" %>
			</div>
			<div>
				<%= form.label :password_confirmation %>:<br />
				<%= form.password_field :password_confirmation,
				 						:class => "short" %>
			</div>
			
			<%= submit_tag "Join!" %>
		<% end %>
	</fieldset>
</div>

Expand error messages for user (new)
Expand error messages for user (new)
