Sha256: adfa89a71eef7ca0e2689061532a3f06b9a6b09f38a9079d54060af00edfbfc2
Contents?: true
Size: 693 Bytes
Versions: 17
Compression:
Stored size: 693 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # The controller to handle the Admin # Terms of service 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_service") redirect_to stored_location_for(current_user) || decidim_admin.root_path else flash[:alert] = t("accept.error", scope: "decidim.admin.admin_terms_of_service") redirect_to decidim_admin.admin_terms_show_path end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems