I have a special case(does not normally occur) render in a filter.
Because its in a filter, I can’t end execution with a ‘return’ which
would work otherwise. Therefore I get this error:
Can only render or redirect once per action
My code in gist:
class MyController < ApplicationController
redirect_to :action => “vip_room”
if params[:password] != “pass”
render :status => 403, :text => “Access denied”
# Things I have tried to end execution here:
# ‘return’ does end execution as simply returns filter
# ‘exit’ causes crash
# I can’t think of a way to use catch/throw
Can anyone please advise?