I want a before filter like “must_have_permission_to_write” that when called if user hasn’t permission to write renders a message saying “you can’t do that!” and return.
Problem is I’m getting “can only render or redirect once per action” of course…
how can I stop the execution in the before filter?
thanks
I think the easiest answer is add a redirect and return false to your
must_have_permission_to_writemethod.Then, create an action for access denied somewhere, add the route, and put whatever you want in the template.