Rails AbstractController::DoubleRenderError despite returning a redirect_to -
my rails app throwing abstractcontroller::doublerendererror. can see controller action below, include multiple render and/or redirects, however, i've read , found doing return should negate exception.
here controller action:
def load redirect_to login , return if @current_login == nil render template: 'app' , return if @current_login end i've verified @current_login nil, meaning should redirect , return.
changing redirect_to login redirect_to '/login' did trick.
i had controller action login in same controller load action, calling login action, had render call in it...
hopefully runs same coincidence , helps them.
Comments
Post a Comment