mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
9 lines
312 B
Ruby
9 lines
312 B
Ruby
class NoticeDismissalController < ApplicationController
|
|
before_action :authenticate_user!
|
|
|
|
def dismiss
|
|
current_user.notice_dismissals.find_or_create_by(notice_id: params[:notice_id].to_i)
|
|
redirect_back(fallback_location: dashboard_path, notice: "Notice dismissed! You won't see it again.")
|
|
end
|
|
end
|