This commit is contained in:
jomo
2014-04-28 03:24:07 +02:00
parent 65f5adf65d
commit 4a308922a5
2 changed files with 10 additions and 1 deletions

View File

@@ -379,9 +379,14 @@ select {
input , select, textarea {
margin: 4px;
vertical-align: middle;
&[type=submit] {
margin: 0;
&.btn {
cursor: pointer;
}
}
option {
padding: 0.5em;

View File

@@ -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