I am wondering why there is no double render when there is redirect_to or render in before_action . Consider this example:
class SomeController < ApplicationController before_action :callback def new callback2 render 'new' end def callback render 'new' end def callback2 render 'new' end end
I see that before_action will be useless if it cannot redirect, but how is it done? If I comment before_action , it will throw an exception. How is before_action implemented so as not to cause double rendering?
ruby ruby-on-rails
Marii
source share