diff options
| author | mo khan <mo@mokhan.ca> | 2014-05-21 22:00:04 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-05-21 22:00:04 -0600 |
| commit | 959bd343e0bae6a06bf1a04c41c58401dea8eec3 (patch) | |
| tree | 740d2a9d30c24c6ae147a998339b6919228b7e22 /app/controllers | |
| parent | 802e38c704c8a2534a4d489ff18d14e62460c437 (diff) | |
move dashboard to my/dashboard.
Diffstat (limited to 'app/controllers')
| -rw-r--r-- | app/controllers/dashboard_controller.rb | 8 | ||||
| -rw-r--r-- | app/controllers/my/dashboard_controller.rb | 8 | ||||
| -rw-r--r-- | app/controllers/tutorials_controller.rb | 4 |
3 files changed, 10 insertions, 10 deletions
diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb deleted file mode 100644 index 4bf4e070..00000000 --- a/app/controllers/dashboard_controller.rb +++ /dev/null @@ -1,8 +0,0 @@ -class DashboardController < ApplicationController - before_filter :authenticate_user! - - def index - @items = (current_user.creations + current_user.tutorials).sort_by! { |x| x.created_at }.reverse - @activities = current_user.recent_activities - end -end diff --git a/app/controllers/my/dashboard_controller.rb b/app/controllers/my/dashboard_controller.rb new file mode 100644 index 00000000..53d9a378 --- /dev/null +++ b/app/controllers/my/dashboard_controller.rb @@ -0,0 +1,8 @@ +module My + class DashboardController < BaseController + def index + @items = (current_user.creations + current_user.tutorials).sort_by! { |x| x.created_at }.reverse + @activities = current_user.recent_activities + end + end +end diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index c133c891..1123b8d0 100644 --- a/app/controllers/tutorials_controller.rb +++ b/app/controllers/tutorials_controller.rb @@ -24,7 +24,7 @@ class TutorialsController < ApplicationController @tutorial = current_user.tutorials.create(tutorial_params) current_user.tag(@tutorial, :with => params[:tutorial_tags], :on => :tags) if @tutorial.save - redirect_to dashboard_path, :notice => t(:tutorial_saved) + redirect_to my_dashboard_path, :notice => t(:tutorial_saved) else flash[:error] = @tutorial.errors.full_messages render :new @@ -44,7 +44,7 @@ class TutorialsController < ApplicationController def destroy @tutorial = current_user.tutorials.find(params[:id]) @tutorial.destroy - redirect_to dashboard_path + redirect_to my_dashboard_path end def tutorial_params |
