diff options
| author | Marius Peter <marius.peter@tutanota.com> | 2024-12-30 20:00:14 +0100 | 
|---|---|---|
| committer | Marius Peter <marius.peter@tutanota.com> | 2024-12-30 20:00:14 +0100 | 
| commit | 0c35617343964ad97d3ee21faf5ff5e5b1088e94 (patch) | |
| tree | 86682bc8b15085325327117c15d57c98e4c66a21 /app/controllers | |
| parent | ec53f7c6e147b231d00fb770623c2b5fe17b86c4 (diff) | |
Added cookies banner.
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/sessions_controller.rb | 7 | 
1 files changed, 6 insertions, 1 deletions
diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 9785c92..fad2c4b 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,5 +1,5 @@  class SessionsController < ApplicationController -  allow_unauthenticated_access only: %i[ new create ] +  allow_unauthenticated_access only: %i[ new create dismiss_banner ]    rate_limit to: 10, within: 3.minutes, only: :create, with: -> { redirect_to new_session_url, alert: "Try again later." }    def new @@ -18,4 +18,9 @@ class SessionsController < ApplicationController      terminate_session      redirect_to new_session_path    end + +  def dismiss_banner +    session[:dismissed_banner] = true +    redirect_to root_path +  end  end  |