Devise and stored_location_for: how do you store the return location?

前端 未结 5 1816
我寻月下人不归
我寻月下人不归 2020-12-25 13:11

I have a page whose path is (e.g.) /premises/92 on which I\'m displaying \"please [log in] or [register] for additional information\" if the user is not logged in, and I wan

5条回答
  •  死守一世寂寞
    2020-12-25 13:35

    Devise looks for the key "#{resource}_return_to" in the session.

    Here I am quoting the API:

    By default, it first tries to find a valid #{resource}_return_to key in the session, then it fallbacks to #{resource}_root_path, otherwise it uses the root_path.

    Here is the link to the API

提交回复
热议问题