mirror of
https://github.com/fspc/BikeShed-1.git
synced 2026-09-16 08:31:36 -04:00
Fix: user email should be null instead of empty string
This commit is contained in:
@@ -54,6 +54,11 @@ class User < ActiveRecord::Base
|
||||
roles.include?(role)
|
||||
end
|
||||
|
||||
# try keeping the email field in DB clear and consistent, without empty strings (NULLs instead)
|
||||
def email=(other)
|
||||
super(other.blank? ? nil : other)
|
||||
end
|
||||
|
||||
### TODO methods below probably belong somewhere else
|
||||
|
||||
def completed_build_bikes
|
||||
|
||||
Reference in New Issue
Block a user