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

Version Path
trusty-cms-7.0.9.1 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.11 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.10 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.9 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.8 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.7 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.6 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.5 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.4 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.3 app/controllers/admin/preferences_controller.rb
trusty-cms-6.3.1 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.2 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.1 app/controllers/admin/preferences_controller.rb
trusty-cms-7.0.0 app/controllers/admin/preferences_controller.rb
trusty-cms-6.3 app/controllers/admin/preferences_controller.rb
trusty-cms-6.2.1 app/controllers/admin/preferences_controller.rb
trusty-cms-6.2.2.1 app/controllers/admin/preferences_controller.rb
trusty-cms-6.2.0 app/controllers/admin/preferences_controller.rb
trusty-cms-6.1.2 app/controllers/admin/preferences_controller.rb
trusty-cms-6.1.1 app/controllers/admin/preferences_controller.rb