I’m using Devise and its confirm option.
As you know, a user won’t be activated unless the user clicks on the link in Confirmation mail.
The problem I have here is, we can see all the members including the user who hasn’t confirmed yet!
@users = User.all will fetch all the users! I don’t want to include
un-confirmed users.
Is there any technique to ignore those who haven’t confirmed yet?
Adding something in User model will be the best!
Please help me:)
I’d recommend adding a scope to your User model for consistent access:
Then in controllers (or other models), this list can be accessed as:
The beauty of scopes is that they could be chained further:
You get the idea 😉
HTH