summaryrefslogtreecommitdiff
path: root/app/controllers/comments_controller.rb
diff options
context:
space:
mode:
authormo k <mo@mokhan.ca>2012-09-27 20:52:04 -0600
committermo k <mo@mokhan.ca>2012-09-27 20:52:04 -0600
commit868cdfb3136d2eceabbd5cd1bb444bd5aa32b09a (patch)
tree9e4c4af15ccd250e3c223525e17bc396874d6572 /app/controllers/comments_controller.rb
parent98db5dfbe7a8ae4d44c90e34e4ebef75f2d75efa (diff)
update the comments controller specs
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