管理ページにアクセスするための1つのパスワードを持つPadrinoアプリを作成しました。私は承認のために次のヘルパーを使用しています。Padrinoの有効期限のないセッション
# Check if the user is authenticated.
def authenticated?(opts = {})
if session["cooly"] != options.session_secret
redirect url(opts[:send_to] || :login)
end
end
# Create a new session.
def authenticate!
session["cooly"] ||= 0
session["cooly"] = options.session_secret
end
私のブラウザを終了すると、セッションが終了し、再度ログインする必要があります。どのようにセッションを維持するのですか?