From 02db8e1a5610c476c155a60655ccb93c06574951 Mon Sep 17 00:00:00 2001 From: Jyrki Gadinger Date: Fri, 21 Feb 2025 17:26:11 +0100 Subject: [PATCH] hund. --- app/controllers/application_controller.rb | 2 +- app/models/user.rb | 2 +- config/justask.yml.example | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 07d6a091..f4145e09 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -98,7 +98,7 @@ class ApplicationController < ActionController::Base def not_readonly_flash!(view_name) return unless Retrospring::Config.readonly? - flash[:error] = t("errors.read_only_mode") + flash.now[:error] = t("errors.read_only_mode") render view_name false diff --git a/app/models/user.rb b/app/models/user.rb index b3b5bee5..ebe1a39a 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -73,7 +73,7 @@ class User < ApplicationRecord length: { minimum: 1, maximum: 16 }, uniqueness: { case_sensitive: false }, screen_name: true, - read_only: true + read_only: true mount_uploader :profile_picture, ProfilePictureUploader, mount_on: :profile_picture_file_name process_in_background :profile_picture diff --git a/config/justask.yml.example b/config/justask.yml.example index 273e8e92..6369428d 100644 --- a/config/justask.yml.example +++ b/config/justask.yml.example @@ -62,7 +62,8 @@ features: advanced_frontpage: enabled: false # readonly mode -- users can only delete - readonly: false + readonly: + enabled: false # Redis redis_url: "redis://localhost:6379"