Sha256: 3882d6840374f94337a32e8aaf288105be7d08911867fc1f52b48da51e9d611f
Contents?: true
Size: 681 Bytes
Versions: 9
Compression:
Stored size: 681 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # The controller to handle the Admin # Terms of use agreement. class AdminTermsController < Decidim::Admin::ApplicationController def accept current_user.admin_terms_accepted_at = Time.current if current_user.save! flash[:notice] = t("accept.success", scope: "decidim.admin.admin_terms_of_use") redirect_to stored_location_for(current_user) || decidim_admin.root_path else flash[:alert] = t("accept.error", scope: "decidim.admin.admin_terms_of_use") redirect_to decidim_admin.admin_terms_show_path end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems