Sha256: 7aedaeb2efad987c69cb6a1523191adc9f999e585539f66380bf4aa0b54ffa50

Contents?: true

Size: 744 Bytes

Versions: 2

Compression:

Stored size: 744 Bytes

Contents

class Spud::UsersController < Spud::ApplicationController
	before_filter :require_user
	layout 'spud/admin/detail'

	def settings
		add_breadcrumb "Settings", :spud_settings_path
		@page_thumbnail = "spud/admin/users_thumb.png"
		@page_name = "Settings"	
	end

	def update
		
		add_breadcrumb "Settings", :spud_settings_path
		@page_thumbnail = "spud/admin/users_thumb.png"
		@page_name = "Settings"	
		if @current_user.update_attributes(params[:spud_user].slice :login,:first_name,:last_name,:email,:password,:password_confirmation)
			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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spud_core-0.7.5 app/controllers/spud/users_controller.rb
spud_core-0.7.4 app/controllers/spud/users_controller.rb