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

Version Path
trusty-cms-3.8.0 app/controllers/admin/preferences_controller.rb
trusty-cms-3.7.1 app/controllers/admin/preferences_controller.rb
trusty-cms-3.7.0 app/controllers/admin/preferences_controller.rb
trusty-cms-3.6.2 app/controllers/admin/preferences_controller.rb
trusty-cms-3.6.1 app/controllers/admin/preferences_controller.rb
trusty-cms-3.6.0 app/controllers/admin/preferences_controller.rb
trusty-cms-3.5.5 app/controllers/admin/preferences_controller.rb
trusty-cms-3.5.4 app/controllers/admin/preferences_controller.rb
trusty-cms-3.5.3 app/controllers/admin/preferences_controller.rb
trusty-cms-3.5.2 app/controllers/admin/preferences_controller.rb
trusty-cms-3.5.1 app/controllers/admin/preferences_controller.rb
trusty-cms-3.5.0 app/controllers/admin/preferences_controller.rb
trusty-cms-3.4.0 app/controllers/admin/preferences_controller.rb
trusty-cms-3.3.7 app/controllers/admin/preferences_controller.rb
trusty-cms-3.3.6 app/controllers/admin/preferences_controller.rb
trusty-cms-3.3.5 app/controllers/admin/preferences_controller.rb
trusty-cms-3.3.3 app/controllers/admin/preferences_controller.rb
trusty-cms-3.3.2 app/controllers/admin/preferences_controller.rb
trusty-cms-3.3.1 app/controllers/admin/preferences_controller.rb
trusty-cms-3.2.1 app/controllers/admin/preferences_controller.rb