summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-05-21 22:43:19 -0600
committermo khan <mo@mokhan.ca>2014-05-21 22:43:19 -0600
commite49bef1d3606217baeba3efbaa44ce5f11f2c93e (patch)
tree15719e332e48c188b683eedd658067c000b616c9 /app/controllers
parent0e1f35bf3f1a023e3f71b916ec5927ab46800249 (diff)
move avatars to my/avatars.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/avatars_controller.rb23
-rw-r--r--app/controllers/my/avatars_controller.rb24
2 files changed, 24 insertions, 23 deletions
diff --git a/app/controllers/avatars_controller.rb b/app/controllers/avatars_controller.rb
deleted file mode 100644
index de803eb7..00000000
--- a/app/controllers/avatars_controller.rb
+++ /dev/null
@@ -1,23 +0,0 @@
-class AvatarsController < ApplicationController
- before_filter :authenticate_user!
- before_filter :find_or_build_avatar
-
- def edit
- end
-
- def update
- @avatar.attach(params[:avatar][:avatar])
- redirect_to edit_avatar_path(current_user), :notice => t(:avatar_uploaded)
- end
-
- protected
-
- def find_or_build_avatar
- if current_user.avatar == nil
- @avatar = current_user.avatar = Avatar.new
- current_user.save
- else
- @avatar = current_user.avatar
- end
- end
-end
diff --git a/app/controllers/my/avatars_controller.rb b/app/controllers/my/avatars_controller.rb
new file mode 100644
index 00000000..cb534ba9
--- /dev/null
+++ b/app/controllers/my/avatars_controller.rb
@@ -0,0 +1,24 @@
+module My
+ class AvatarsController < BaseController
+ before_filter :find_or_build_avatar
+
+ def edit
+ end
+
+ def update
+ @avatar.attach(params[:avatar][:avatar])
+ redirect_to edit_my_avatar_path(current_user), :notice => t(:avatar_uploaded)
+ end
+
+ protected
+
+ def find_or_build_avatar
+ if current_user.avatar == nil
+ @avatar = current_user.avatar = Avatar.new
+ current_user.save
+ else
+ @avatar = current_user.avatar
+ end
+ end
+ end
+end