Why isn't the other node getting updated?
===

In my Rails app, there are nodes which can point to each other by filling in the id of their previous_node_id and next_node_id columns. When I create a node, it successfully points back to the previous node, but the previous node does not change and its next_node_id value remains nil. How do I fix this? (I'll also appreciate any comments about how to improve the code.) 

 
NodesController:

    def create
    @node = current_user.nodes.build(params[:node])

    if params[:previous_node_id].present?
    setup_node_pointers(Node.find(params[:previous_node_id]), @node ) 
    end

    if @node.save
    ...//end of the controller

Relevant code from the Helper:

    def	setup_node_pointers(previous_node, current_node)
    	previous_node.next_node_id = current_node.id
    	current_node.previous_node_id = previous_node.id
    	previous_node.save 
    end