1

I have a boolean attribute 'boss' on my user model, how do I create a custom authenticate_user! in my before_filter so that only users where user.boss == true are authenticated?

Pardeep Dhingra
  • 3,916
  • 7
  • 30
  • 56
raphael_turtle
  • 7,154
  • 10
  • 55
  • 89

1 Answers1

-2
before_filter do 
    redirect_to root_path unless current_user && current_user.boss?
end
raphael_turtle
  • 7,154
  • 10
  • 55
  • 89