Sha256: 22ab2e4740323720bfc2b5f174f01ab3a6fd6c07092af39a9d10c46130a5ba0e
Contents?: true
Size: 654 Bytes
Versions: 72
Compression:
Stored size: 654 Bytes
Contents
# frozen_string_literal: true module Decidim # The controller to handle the current user's # Terms and Conditions agreement. class TosController < Decidim::ApplicationController skip_before_action :store_current_location def accept_tos current_user.accepted_tos_version = Time.current if current_user.save! flash[:notice] = t("accept.success", scope: "decidim.pages.terms_and_conditions") redirect_to after_sign_in_path_for current_user else flash[:alert] = t("accept.error", scope: "decidim.pages.terms_and_conditions") redirect_to decidim.page_path tos_page end end end end
Version data entries
72 entries across 72 versions & 1 rubygems