theseus/app/controllers/public/settings_controller.rb
nora 5da418169d
add opt-out from anonymous map (#149)
* add field & ui for map opt out

* no opters out in map data gen
2025-07-29 17:11:37 -04:00

14 lines
369 B
Ruby

module Public
class SettingsController < ApplicationController
before_action :authenticate_public_user!
def anonymous_map
end
def update_anonymous_map
current_public_user.update!(opted_out_of_map: params[:opt] == "out")
flash[:success] = "k, pls wait for the map to recache itself"
redirect_to anonymous_map_path
end
end
end