Basic site flow improvements and devise handling
This commit is contained in:
@@ -39,8 +39,9 @@ class Supplier
|
||||
view :by_email, key: :email
|
||||
|
||||
validates :name, presence: true
|
||||
validates :email, email: true
|
||||
validates :iens_profile, numericality: {allow_blank: true}
|
||||
validates :password, confirmation: true
|
||||
validates :password, confirmation: true, presence: {if: ->(r){ r.new_record? }}
|
||||
|
||||
def location=(val)
|
||||
lat, lng = val.is_a?(Array) ? val : val.strip.split(/[ ,]+/).map(&:to_f)
|
||||
|
||||
Reference in New Issue
Block a user