Skip to content
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

Verified as Boolean, instead of string #152

Open
cromulus opened this issue Jan 11, 2016 · 2 comments
Open

Verified as Boolean, instead of string #152

cromulus opened this issue Jan 11, 2016 · 2 comments

Comments

@cromulus
Copy link
Contributor

Right now, Verified on the Person model is a string, which makes it difficult to turn into a default scope.

Could we make this a boolean?
What are the values so that we can make a migration to update previous values tot he boolean?

@shua123
Copy link
Contributor

shua123 commented Jan 11, 2016

I thought about boolean.
Right now we are using the text to specify how people are being verified.
"Verified by Text Message"
"Verified by Text Message Signup"
"Verified by Josh manually"

So, maybe? I was leaving it flexible to start.

@cromulus
Copy link
Contributor Author

Perhaps an Enum makes sense here?
http://api.rubyonrails.org/v4.1/classes/ActiveRecord/Enum.html
and
http://www.justinweiss.com/articles/creating-easy-readable-attributes-with-activerecord-enums/

This way, scopes for verified vs unverified could be quite easily implemented.

@smarziano smarziano added this to the Enhancements milestone Feb 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants