Skip to content

Instantly share code, notes, and snippets.

@MSchmidt
Created May 4, 2011 00:10
Show Gist options
  • Save MSchmidt/954501 to your computer and use it in GitHub Desktop.
Save MSchmidt/954501 to your computer and use it in GitHub Desktop.
_confirmation issue
<form accept-charset="UTF-8" action="/users" class="user_new" data-validate="true" id="user_new" method="post" novalidate="novalidate"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="&#x2713;" /><input name="authenticity_token" type="hidden" value="UOSsqrVpcyhwv8t0izOEq85KfZ0p+u2OIRvdACqlFLs=" /></div>
<p><input data-validate="true" id="user_full_name" name="user[full_name]" placeholder="Your Full Name" size="30" type="text" /></p>
<p><input data-validate="true" id="user_email" name="user[email]" placeholder="Your E-Mail Address" size="30" type="email" value="" /></p>
<p><input id="user_password" name="user[password]" placeholder="Pick a Password" size="30" type="password" /></p>
<p><input id="user_password_confirmation" name="user[password_confirmation]" placeholder="Confirm Your Password" size="30" type="password" /></p>
<div class="clearfix"><input id="user_submit" name="commit" type="submit" value="Sign up" /></div>
</form><script>var user_new = {"type":"ActionView::Helpers::FormBuilder","input_tag":"<div class=\"field_with_errors\"><span id=\"input_tag\" /><label for=\"\" class=\"message\"></label></div>","label_tag":"<div class=\"field_with_errors\"><label id=\"label_tag\" /></div>","validators":{"user[full_name]":{"presence":{"message":"can't be blank"}},"user[email]":{"uniqueness":{"message":"is already taken","case_sensitive":true,"allow_blank":true},"format":{"message":"is invalid","with":/^([\w\.%\-]+)@([\w\-]+\.)+([\w]{2,})$/i,"allow_blank":true}}}};</script>
<hr />
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :validate => true) do |f| %>
<%= devise_error_messages! %>
<p><%= f.text_field :full_name, :placeholder => 'Your Full Name' %></p>
<p><%= f.email_field :email, :placeholder => 'Your E-Mail Address' %></p>
<p><%= f.password_field :password, :placeholder => 'Pick a Password', :validate => false %></p>
<p><%= f.password_field :password_confirmation, :placeholder => 'Confirm Your Password', :validate => false %></p>
<div class="clearfix"><%= f.submit "Sign up" %></div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment