%h1 Registration

= form_for @user do |f|
  .form-group
    = f.label :name
    = f.text_field :name, required: true

  .form-group
    = f.label :email
    = f.email_field :email, required: true

  .form-group
    = f.label :password
    = f.password_field :password, required: true

  .form-group
    = f.label :password_confirmation
    = f.password_field :password_confirmation, required: true

  = f.submit 'Register'

%h1 Registration

-if @user.errors.any?
  %h2
    = pluralize(@user.errors.count, "error")
    prohibited this user from being saved:

  %ul
  - @user.errors.full_messages.each do |msg|
    %li= msg

= form_for @user do |f|
  .form-group
    = f.label :name
    = f.text_field :name, required: true

  .form-group
    = f.label :email
    = f.email_field :email, required: true

  .form-group
    = f.label :password
    = f.password_field :password, required: true

  .form-group
    = f.label :password_confirmation
    = f.password_field :password_confirmation, required: true

  = f.submit 'Register'

Add error messages to registration form.
Add error messages to registration form.
