fix dup/clone confusion

This commit is contained in:
joshua stein 2015-10-18 15:09:39 -05:00
parent 77568760a2
commit d44d43e551

View file

@ -178,7 +178,7 @@ class StoriesController < ApplicationController
end end
def submit_suggestions def submit_suggestions
ostory = @story.clone ostory = @story.dup
@story.title = params[:story][:title] @story.title = params[:story][:title]
if @story.valid? if @story.valid?
@ -195,7 +195,7 @@ class StoriesController < ApplicationController
end end
if dsug if dsug
ostory.reload ostory = @story.reload
flash[:success] = "Your suggested changes have been noted." flash[:success] = "Your suggested changes have been noted."
end end
redirect_to ostory.comments_path redirect_to ostory.comments_path