Sha256: b2a22fa0db0f15e406e07106dcc6cbccc5d15c31b4f77f262429d2a67151fd4a
Contents?: true
Size: 688 Bytes
Versions: 39
Compression:
Stored size: 688 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_attributes(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(:name, :email, :login, :password, :password_confirmation, :locale) end end
Version data entries
39 entries across 39 versions & 1 rubygems