summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-10-03 21:19:46 -0600
committermo khan <mo@mokhan.ca>2014-10-03 21:19:46 -0600
commitb1b2f81a0dc4a66b1b59f77de23f690cd68c7271 (patch)
tree16f04f60373b2bc1571f8e476788c0fcf8c3f412 /app/controllers/api/v1
parent9afe0efcb41e5f9e6c711b6cd3a9330e8179ccb8 (diff)
render profiles page in backbone.
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/profiles_controller.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/app/controllers/api/v1/profiles_controller.rb b/app/controllers/api/v1/profiles_controller.rb
new file mode 100644
index 00000000..e0b223a9
--- /dev/null
+++ b/app/controllers/api/v1/profiles_controller.rb
@@ -0,0 +1,20 @@
+module Api
+ module V1
+ class ProfilesController < ApiController
+ def show
+ @profile = current_user
+ end
+
+ def update
+ @profile = current_user
+ @profile.update(secure_params)
+ end
+
+ private
+
+ def secure_params
+ params.require(:profile).permit(:name, :email, :city, :website, :twitter, :facebook)
+ end
+ end
+ end
+end