Dev new #32

Merged
bruncbrunc merged 24 commits from dev-new into master2 2017-06-18 13:11:37 -04:00
2 changed files with 2 additions and 1 deletions
Showing only changes of commit 00254ebf51 - Show all commits

View File

@@ -9,7 +9,7 @@ class User < ActiveRecord::Base
has_secure_password
before_validation :strip_whitespaces, :set_uuid, :set_name, :set_email_token, :set_role
before_validation :strip_whitespaces, :set_uuid, :set_name, :set_email_token, :set_role, :set_badge
validates_presence_of :password, :password_confirmation, :email_token, on: :create
validates_presence_of :name, :email, :ign

View File

@@ -7,6 +7,7 @@ class AddBadgeIdToUsers < ActiveRecord::Migration
t.string "color"
end
Badge.create!({name: "none", symbol: "", color: "#000"})
dbadge = Badge.create!({name: "donor", symbol: "$", color: "#f60"})
add_column :users, :badge_id, :integer, default: 0