1 class PreferencesController < ApplicationController
4 before_action :authorize_web
5 before_action :set_locale
7 authorize_resource :class => false
9 before_action :check_database_readable
10 before_action :check_database_writable, :only => [:update]
17 current_user.languages = params[:user][:languages].split(",")
19 current_user.preferred_editor = if params[:user][:preferred_editor] == "default"
22 params[:user][:preferred_editor]
25 flash[:notice] = t ".success"
26 redirect_to preferences_path
28 flash[:error] = t ".failure"