Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %h1 Registration
- = form_tag '/doregister' do
- -if @user.errors.any?
- .error_message
- %h2 Please correct the issues below:
- %ul
- -@user.errors.each do |attribute, message|
- -next if attribute == :password_digest
- %li= @user.errors.full_message(attribute, message)
- = label :user, :name, 'Choose your username'
- = text_field :user, :name, :size => 50, :maxlength => 20, :autofocus => true
- .hint Only alphanumeric characters and underscore
- = label :user, :password, 'Choose a password'
- = password_field :user, :password, :size => 50, :maxlength => 20
- .hint 4 or more characters
- = label :user, :password_confirmation, 'Confirm the password'
- = password_field :user, :password_confirmation, :size => 50, :maxlength => 20
- = label :user, :email, 'Your email address'
- = email_field :user, :email, :size => 50
- = submit_tag 'Register'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement