Update won't update associated objects using roar-rails
===

I am using ROAR-Rails to create a RESTful interface to my database that will be used by a JS/jQuery front end. Up to this point it is pretty awesome.  I am really impressed with how easy Rails and ROAR have made this. However, I have hit a snag.  I can't get my updates to work through an association.  Here is the quick overview:

I have three tables: students, households, and student_households.  Students and Households have a many-to-many relationship through the student_households table.  It is a rich join and the student_households table has data in it.  I am having no problem pulling data out.  I can get a json student object and it will contain all the households associated.  However, if I try to make a change to a household object and update it (using a PUT) through the student_households_controller, it will do an update on the student_households table, but it always does an insert on the households table. Basically, I end up with a new household row and the student_household row is updated to point to the new household.

Can anyone tell me what I am doing wrong?  I want it to update both the student_household record and the underlying household record (not create a new one).  Here is the relevant code for Model, Controller, and Representer: household and student_household.  I am pretty new to Rails and this is the first time I've use ROAR: I'm sure it shows :)

    # household.rb - Household model
    ###########################################
    class Household < ActiveRecord::Base
      attr_accessible :label, :address1, :address2, :city, :state, :zip 
    
      #Associations
      # rich Many-to-Many students through student_households
      has_many :student_households
      has_many :students, :through => :student_households
      
    end 
    
    # student_household.rb - StudentHousehold model
    ###########################################
    class StudentHousehold < ActiveRecord::Base
       attr_accessible :use_mail 
    
      #Associations
      #rich Many-to-Many joins student to household (through this)
      belongs_to :student
      belongs_to :household
    end
    
    # households_controller.rb
    ###########################################
    class HouseholdsController < ApplicationController
      #disable the csrf token for update - come back and understand this!
      protect_from_forgery :except => :update
      #ROAR
      include Roar::Rails::ControllerAdditions
      respond_to :json
    
      # GET /households/1.json
      def show
        household = Household.find_by_id(params[:id])
        respond_with household
      end
    
      # PUT /households/1.json
      def update
        household = Household.find_by_id(params[:id])
        consume!(household)
        household.save
        respond_with household
      end
    end
    
    
    # student_households_controller.rb
    ###########################################
    class StudentHouseholdsController < ApplicationController
      #disable the csrf token for update - come back and understand this!
      protect_from_forgery :except => :update
      #ROAR
      include Roar::Rails::ControllerAdditions
      respond_to :json
    
      # GET /student_households/1.json
      def show
        stu_household = StudentHousehold.find_by_id(params[:id])
        respond_with stu_household, :represent_with => StudentHouseholdRepresenter
      end
    
      # PUT /student_households/1.json
      def update
        stu_household = StudentHousehold.find_by_id(params[:id])
        consume!(stu_household)
        stu_household.save
        respond_with stu_household
      end
    end
    
    # household_representer.rb
    ###########################################
    module HouseholdRepresenter
      include Roar::Representer::JSON::HAL
      include Roar::Representer::Feature::Hypermedia
    
      property :label, :render_nil => true
      property :address1, :render_nil => true
      property :address2, :render_nil => true
      property :city, :render_nil => true
      property :state, :render_nil => true
      property :zip, :render_nil => true
    
      link :update do
        household_url(:id => id, :format => :json)
      end
    end
    
    # student_household_representer.rb
    ###########################################
    module StudentHouseholdRepresenter
      include Roar::Representer::JSON::HAL
      include Roar::Representer::Feature::Hypermedia
    
      property :use_mail, :render_nil => true
    
      property :household,
        :class => Household,
        :extend => HouseholdRepresenter
    
      link :update do
        student_household_url(:id => id, :format => :json)
      end
    end

