Rails : render and exit immediately

前端 未结 2 717
误落风尘
误落风尘 2021-02-03 19:16

Using the omniauth gem, I am forced to define a single route callback for succesful logins, regardless of the provider :

def auth_callback 

        auth_data =          


        
2条回答
  •  眼角桃花
    2021-02-03 19:54

    Why not specifically call render in those methods?

    def process_one
     # do something then render view for process_one
     render :process_one and return
    end
    

    Rails should detect that you've already run it and not try to render again.

提交回复
热议问题