Class: Admin::SettingsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/admin/settings_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject



6
7
8
# File 'app/controllers/admin/settings_controller.rb', line 6

def edit
  
end

#updateObject



10
11
12
13
14
15
16
17
# File 'app/controllers/admin/settings_controller.rb', line 10

def update
  if @current_user.update_attributes(params[:spud_user].slice :,:first_name,:last_name,:email,:password,:password_confirmation,:time_zone)
    flash[:notice] = "User settings saved successfully."
    redirect_to admin_root_path
  else
    render 'edit'
  end
end