From 55bc7e53f260bda99fd007d3422b264e1f4f6124 Mon Sep 17 00:00:00 2001 From: hukl Date: Mon, 9 Mar 2009 00:01:33 +0100 Subject: after creating a node, edit it rather than showing it --- app/controllers/nodes_controller.rb | 2 +- test/functional/nodes_controller_test.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/nodes_controller.rb b/app/controllers/nodes_controller.rb index f82ab82..0c961b7 100644 --- a/app/controllers/nodes_controller.rb +++ b/app/controllers/nodes_controller.rb @@ -32,7 +32,7 @@ class NodesController < ApplicationController if parent and @node.save @node.move_to_child_of parent - redirect_to(@node) + redirect_to(edit_node_path(@node)) else @node.errors.add("Parent node") render :action => :new diff --git a/test/functional/nodes_controller_test.rb b/test/functional/nodes_controller_test.rb index fdeb6cb..edc49b6 100644 --- a/test/functional/nodes_controller_test.rb +++ b/test/functional/nodes_controller_test.rb @@ -19,7 +19,7 @@ class NodesControllerTest < ActionController::TestCase def test_create login_as :quentin post :create, :node => {:slug => 'foobar'}, :parent_id => Node.root.id - assert_redirected_to node_path(Node.last) + assert_redirected_to edit_node_path(Node.last) end def test_editing_a_node -- cgit v1.3