bugfix
This commit is contained in:
@@ -379,9 +379,14 @@ select {
|
||||
input , select, textarea {
|
||||
margin: 4px;
|
||||
vertical-align: middle;
|
||||
|
||||
&[type=submit] {
|
||||
margin: 0;
|
||||
&.btn {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
option {
|
||||
padding: 0.5em;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ class User < ActiveRecord::Base
|
||||
|
||||
has_secure_password
|
||||
|
||||
before_validation :strip_whitespaces, :set_uuid, :set_name, :set_email_token
|
||||
before_validation :strip_whitespaces, :set_uuid, :set_name, :set_email_token, set_role
|
||||
|
||||
validates_presence_of :password, :password_confirmation, :email_token, :on => :create
|
||||
validates_presence_of :name, :email, :ign
|
||||
@@ -173,6 +173,10 @@ class User < ActiveRecord::Base
|
||||
|
||||
private
|
||||
|
||||
def set_role
|
||||
self.role ||= Role.get(:normal)
|
||||
end
|
||||
|
||||
def set_uuid
|
||||
if !self.uuid.present?
|
||||
# idk
|
||||
|
||||
Reference in New Issue
Block a user