You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 12, 2021. It is now read-only.
I had a User model and Email attribute. So I tried to generate unique token like below.
class User < ActiveRecord::Base
uniquify :token do
email.split('@').first.downcase << rand(9999999).to_s
end
end
But it finally raises error "undefined local variable or method `email'". How to pass the instance user object's email value to uniquify block?
Thanks Guru!
The text was updated successfully, but these errors were encountered: