From 868cdfb3136d2eceabbd5cd1bb444bd5aa32b09a Mon Sep 17 00:00:00 2001 From: mo k Date: Thu, 27 Sep 2012 20:52:04 -0600 Subject: update the comments controller specs --- app/controllers/comments_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'app/controllers/comments_controller.rb') 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 -- cgit v1.2.3