Skip to content

Commit

Permalink
Fixed broken scenario, caused by the change in our form structure.
Browse files Browse the repository at this point in the history
Though this change fixes this issue, it may have side effect which we'll need to verify before our merge
  • Loading branch information
baphled committed Jun 27, 2010
1 parent c3bea45 commit d9f4179
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions app/controllers/features_controller.rb
Expand Up @@ -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" }
Expand Down
2 changes: 1 addition & 1 deletion features/enhanced/ajaxified_forms.feature
Expand Up @@ -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
Expand Down

0 comments on commit d9f4179

Please sign in to comment.