On 30 January 2017 at 21:48, Joe Guerra <firstname.lastname@example.org> wrote:
> I know there is a current_user method for devise, but how do you check if
> the user is admin? (I've got a user flagged as admin).
Do you mean that you have a column in users table named admin which is
true or false? if so then just test current_user.admin
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to email@example.com.
To post to this group, send email to firstname.lastname@example.org.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLtOR51yPy8BjfdNQsxPJUkwww%3DhWRTDjN1O2axeS020Aw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.