I need a rails command that can query all the users who has a value in home_state. I have tried to use:
User.where('home_state')
but couldn't retrieve any information from it.
I need a rails command that can query all the users who has a value in home_state. I have tried to use:
User.where('home_state')
but couldn't retrieve any information from it.
If you are looking for all users that do not have nil as a value for home_state, you can use User.where.not(home_state: nil)