diff --git a/app/controllers/features_controller.rb b/app/controllers/features_controller.rb index ad23cb1a..84a5b71f 100644 --- a/app/controllers/features_controller.rb +++ b/app/controllers/features_controller.rb @@ -31,11 +31,11 @@ def create flash[:notice] = "Feature: #{@feature.title}, was created" find_features_stories if "Submit" == params[:commit] - format.html { redirect_to @feature } - format.js { render "create.rjs" } - else format.html { redirect_to :back } format.js { render "index.rjs" } + else + format.html { redirect_to @feature } + format.js { render "create.rjs" } end else format.js { render :action => "edit" } diff --git a/features/enhanced/ajaxified_forms.feature b/features/enhanced/ajaxified_forms.feature index cbe664e6..a73769e7 100644 --- a/features/enhanced/ajaxified_forms.feature +++ b/features/enhanced/ajaxified_forms.feature @@ -33,7 +33,7 @@ Feature: All our forms need to be passed to the server via AJAX Then submit the form And there should be an AJAX request And the form should be hidden - And a flash message "Feature: Logging in via ajax, was created" should be dynamically displayed + And a flash message "was created" should be dynamically displayed Scenario: We should be able to submit an editted feature form via AJAX Given I can view the features page