Fix #1406. Registration form consistency with User model
This commit is contained in:
parent
b3be600855
commit
a6cdd93a66
2 changed files with 2 additions and 2 deletions
|
|
@ -53,7 +53,7 @@ class User < ActiveRecord::Base
|
||||||
|
|
||||||
scope :admin, -> { where(is_admin: true) }
|
scope :admin, -> { where(is_admin: true) }
|
||||||
|
|
||||||
validates :email, presence: true
|
validates :email, :password, :password_confirmation, presence: true
|
||||||
|
|
||||||
validates :username,
|
validates :username,
|
||||||
uniqueness: {
|
uniqueness: {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
= semantic_form_for(resource, as: resource_name, url: registration_path(resource_name)) do |f|
|
||||||
= f.input :username, input_html: { required: true }
|
= f.input :username, input_html: { required: true }
|
||||||
= f.input :email, 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, input_html: { required: true }
|
||||||
= f.input :password_confirmation, input_html: { required: true }
|
= f.input :password_confirmation, input_html: { required: true }
|
||||||
%p.text-right
|
%p.text-right
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue