Sha256: 5cd5797256230e3dff90c49bfbc9f6e8ea9f17f7604e0a4398ec48c5eca6583c
Contents?: true
Size: 687 Bytes
Versions: 73
Compression:
Stored size: 687 Bytes
Contents
class Admin::PreferencesController < ApplicationController before_action :initialize_variables def show set_standard_body_style render :edit end def edit render end def update if @user.update(preferences_params) redirect_to admin_configuration_path else flash[:error] = t('preferences_controller.error_updating') render :edit end end private def initialize_variables @user = current_user @controller_name = 'user' @template_name = 'preferences' end def preferences_params params.require(:user).permit(:first_name, :last_name, :email, :password, :password_confirmation, :locale) end end
Version data entries
73 entries across 73 versions & 1 rubygems