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

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -