2 class PreferencesController < ApplicationController
5 before_action :authorize_web
6 before_action :set_locale
8 authorize_resource :class => :preferences
10 before_action :check_database_readable
11 before_action :check_database_writable, :only => :update
17 # Use a partial so that it is rendered during the next page load in the correct language.
18 flash[:notice] = { :partial => "update_success_flash" }
19 redirect_to :action => :show
21 flash.now[:error] = t "failure", :scope => "preferences.preferences.update"