I’m trying to lock down a specfic template in my rails application to a particular user type, but only have a sinlge user model at the moment. There is a method that determines if the logged in user can access that page. Is this not possible within rails, and I have to do this at the controller level.
I was hoping that I could just simply put something like this into the template.
<%= current_user.reviewer? redirect: 401 %>
but I can’t find anything that seems able to do a redirect from the template.