-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normal that my primary key is "MUL"? #25
Comments
Also, How do I make it a v1 UUID instead of v4? |
Regarding the first question - please, show your sources. |
Migration:
survey.rb
|
Looks proper, except |
Ah, got it. It is MUL because of |
That fixed it! Thanks! I saw the I'm sure you are busy but would you mind answering a few straggling questions of mine, just for the sake of learning?
def token
id.hexdigest
end
def self.id_from_token(token)
UUIDTools::UUID.parse_hexdigest(token)
end Thanks! |
If you ask me - there is no indication to use activeuuid at all. In your place, I would make a usual autoincrement id and additional token field with uniq index to store hex values. And use simply before_save to generate this token. I do not know about the difference between v1 and v4, but you can use whatever you need with http://www.ruby-doc.org/stdlib-1.9.3/libdoc/securerandom/rdoc/SecureRandom.html |
I'm looking at my MySQL table after I set
:primary_key => true
, and it's saying instead of PRI it's "MUL". Is this okay?The text was updated successfully, but these errors were encountered: