diff --git a/app/models/user.rb b/app/models/user.rb index 05edcce6..2f5d41e8 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -53,7 +53,7 @@ class User < ActiveRecord::Base scope :admin, -> { where(is_admin: true) } - validates :email, presence: true + validates :email, :password, :password_confirmation, presence: true validates :username, uniqueness: { diff --git a/app/views/devise/registrations/new.html.haml b/app/views/devise/registrations/new.html.haml index 36eeb6e3..0b434870 100644 --- a/app/views/devise/registrations/new.html.haml +++ b/app/views/devise/registrations/new.html.haml @@ -9,7 +9,7 @@ = semantic_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f| = f.input :username, input_html: { required: true } = f.input :email, input_html: { required: true } - = f.input :name, input_html: { required: true } + = f.input :name = f.input :password, input_html: { required: true } = f.input :password_confirmation, input_html: { required: true } %p.text-right