How can I reload the current page in Ruby on Rails?

后端 未结 9 1554

I currently have a login popup in my header bar which is on every page in my website. I want to be able to reload the current page that the person is on after a successful

9条回答
  •  一向
    一向 (楼主)
    2020-12-28 12:27

    This syntax is what you want... works in Rails 6

      respond_to do |format|
        format.html { redirect_to request.referrer, notice: "User was successfully WHATEVER." }
      end
    

提交回复
热议问题