Class: Spud::UsersController

Inherits:
ApplicationController show all
Defined in:
app/controllers/spud/users_controller.rb

Instance Method Summary collapse

Instance Method Details

#settingsObject



5
6
7
8
# File 'app/controllers/spud/users_controller.rb', line 5

def settings
	@page_thumbnail = "spud/admin/users_thumb.png"
	@page_name = "Settings"	
end

#updateObject



10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/spud/users_controller.rb', line 10

def update
	@page_thumbnail = "spud/admin/users_thumb.png"
	@page_name = "Settings"	
	if @current_user.update_attributes(params[:spud_user])
		flash[:notice] = "User settings saved successfully."
		redirect_to spud_admin_root_url()
	else
		flash[:error] = "There was an error while saving the user."
		render :action => "settings"
	end
end