summaryrefslogtreecommitdiff
path: root/app/controllers/comments_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/comments_controller.rb')
-rw-r--r--app/controllers/comments_controller.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index 451c5cc9..7fb5e7d3 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -6,8 +6,7 @@ class CommentsController < ApplicationController
end
def create
- command_for(CommentOnCreationCommand).run(params)
- flash[:notice] = "Nice Comment!"
- redirect_to :controller => 'creations', :action => 'show', :id => params[:creation_id]
+ comment = command_for(CommentOnCreationCommand).run(params)
+ redirect_to comment.commentable, :notice => 'Nice Comment!'
end
end