Hi, 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. Cheers Michael -- 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 rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/b3553cc0-2ffe-4a81-89f3-de4245abbdb0%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.