Under development at sinatra
With reke db: migrate
ʻArgumentError: Unknown validator: Cause and action when'UniqunessValidator'` appears
uniqnessvlidator? I don't know that! I'm writing something like that I once erased the validation I wrote earlier on the corresponding model!
user.rb
class User < ActiveRecord::Base
# validates :email, presence: true, length: {maximum: 255 },
# format: { with: /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i },
# uniquness: { case_sensitive: false }
# has_secure_password
end
Now run rake db: migrate
and it's migrated!
The uniqueness e is missing! !! !!
user.rb
uniquness: { case_sensitive: false }
Be careful of typos ...