diff options
| author | mo khan <mo@mokhan.ca> | 2014-01-19 09:58:23 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-01-19 09:59:49 -0700 |
| commit | 1d92fc21da004fa7763107bc68c479fabfda5669 (patch) | |
| tree | a9dd514f6421dc9d21142de4291822a02e41caf6 /app/controllers/tutorials_controller.rb | |
| parent | 8c2cdfc755bfb897e780675992e0cc4a0f1aa28d (diff) | |
redirect to dashboard after submitting a tutorial
Diffstat (limited to 'app/controllers/tutorials_controller.rb')
| -rw-r--r-- | app/controllers/tutorials_controller.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index 578b836f..c133c891 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 tutorials_path, :notice => t(:tutorial_saved) + redirect_to dashboard_path, :notice => t(:tutorial_saved) else flash[:error] = @tutorial.errors.full_messages render :new @@ -44,10 +44,7 @@ class TutorialsController < ApplicationController def destroy @tutorial = current_user.tutorials.find(params[:id]) @tutorial.destroy - - respond_to do |format| - format.html { redirect_to(tutorials_url) } - end + redirect_to dashboard_path end def tutorial_params |
