Class: SimpleShowcaseAdmin::DetailsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/simple_showcase_admin/details_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#not_authenticated

Instance Method Details

#editObject



3
4
5
# File 'app/controllers/simple_showcase_admin/details_controller.rb', line 3

def edit
  @user = SimpleShowcaseAdmin::User.find(params[:id])
end

#showObject



16
17
18
# File 'app/controllers/simple_showcase_admin/details_controller.rb', line 16

def show
  @user = SimpleShowcaseAdmin::User.find(params[:id])
end

#updateObject



7
8
9
10
11
12
13
14
# File 'app/controllers/simple_showcase_admin/details_controller.rb', line 7

def update
  @user = SimpleShowcaseAdmin::User.find(params[:id])
  if @user.update_attributes(params[:user])
    redirect_to detail_path(@user), :notice => "You have successfully updated your personal details"
  else
    render :edit
  end
end