Sha256: fba790a245c5c90612df89f7c3c5286ea6db2608c36efaa16c95b78c237eb39a

Contents?: true

Size: 556 Bytes

Versions: 27

Compression:

Stored size: 556 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This controller allows the user to accept the cookie policy.
  class CookiePolicyController < Decidim::ApplicationController
    skip_before_action :store_current_location

    def accept
      response.set_cookie "decidim-cc", value: "true",
                                        path: "/",
                                        expires: 1.year.from_now.utc

      respond_to do |format|
        format.js
        format.html { redirect_back fallback_location: root_path }
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
decidim-core-0.13.1 app/controllers/decidim/cookie_policy_controller.rb
decidim-core-0.12.2 app/controllers/decidim/cookie_policy_controller.rb
decidim-core-0.13.0 app/controllers/decidim/cookie_policy_controller.rb
decidim-core-0.12.1 app/controllers/decidim/cookie_policy_controller.rb
decidim-core-0.13.0.pre1 app/controllers/decidim/cookie_policy_controller.rb
decidim-core-0.12.0 app/controllers/decidim/cookie_policy_controller.rb
decidim-core-0.12.0.pre app/controllers/decidim/cookie_policy_controller.rb