ruby on rails 4 - How to check status of invitation? -


for each user want display invitation status: "invitation sent" or "invitation accepted"

currently check if field encrypted_password in users table contains anything. if not - user did not registered (accepted invitation) yet sent him (otherwise user's record not exist in db)

is there more elegant way it?

yes should take

is_registered:boolean

column in user table contains default value "false". have when user registered time change value "true". when ever want check user registered? do

@user.is_registered? or current_user.is_registered? 

this returns true/false


Comments

Popular posts from this blog

How to connect android app to App engine -

gcc - MinGW's ld cannot perform PE operations on non PE output file -

php - display validation error message next to the textbox in codeigniter -