summaryrefslogtreecommitdiff
path: root/users/app/controllers/users_controller.rb
diff options
context:
space:
mode:
authorAzul <azul@leap.se>2012-11-22 17:31:18 +0100
committerAzul <azul@leap.se>2012-11-22 17:31:18 +0100
commit33c124aa67788d5c64906f7b3e21ad383577b2a8 (patch)
treeda36967527c8edf6034e90c05acd956fa402ecbd /users/app/controllers/users_controller.rb
parentddd53a0841cb2af091e1ed3a6e69e9fc52977c08 (diff)
basic user edit form and actions
Diffstat (limited to 'users/app/controllers/users_controller.rb')
-rw-r--r--users/app/controllers/users_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/users/app/controllers/users_controller.rb b/users/app/controllers/users_controller.rb
index 82d2eac..46ecc32 100644
--- a/users/app/controllers/users_controller.rb
+++ b/users/app/controllers/users_controller.rb
@@ -15,4 +15,14 @@ class UsersController < ApplicationController
@user = e.document
respond_with(@user, :location => new_user_path)
end
+
+ def edit
+ @user = current_user
+ end
+
+ def update
+ @user = current_user
+ @user.update!(params[:user])
+ respond_with(@user, :location => edit_user_path(@user))
+ end
end