render() doesn’t have to be the last thing you call in a controller
action, you just need to make sure that render() should only be
called once per action.
But render() doesn’t magically stop processing in your action. So if
you’re trying to avoid reaching “… other code in method” then you
need to ‘return’ in your controller method:
A more succinct way is to say:
Some people don’t like having multiple exit points in a method. As a
guideline I agree, it’s not a great habit to get into but it does
have its place, and imho this is one of them.