Just noticed I'm getting another error when trying to add a new item via 
select-one-or-new to a new record.  I added to the create of the controller 
per below:

class UnitsController < ApplicationController
...
  def create
    hobo_create do
      if request.xhr?
        self.this = LocationMaterial.new
      end
    end
  end
...
end

The new record is being created but I'm getting the following error in the 
console:

  Processing by UnitsController#create as JS
  Parameters: {"page_path"=>"/locations/5-floor", 
"render"=>{"0"=>{"part_context"=>"BAhbCTokc2VsZWN0X29uZV9vcl9uZXdfZGlhbG9nX3NlbGVjdCIKOnVuaXRb\nAFsHIhZsb2NhdGlvbl9tYXRlcmlhbCIJdW5pdA==--e8fe1ef51c4729e7a133460501f6d020afd806d3\n",
 
"id"=>"select-one--unit"}}, 
"authenticity_token"=>"bWsM7rTxrD19qAL8j58xNyGO9JFiLp7yVKGeMeb6/no=", 
"unit"=>{"name"=>"alsdkllll"}}
  SQL (0.2ms)  SELECT COUNT(*) FROM "users"
  User Load (0.2ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 1 
LIMIT 1
  AREL (0.2ms)  INSERT INTO "units" ("name", "created_at", "updated_at") 
VALUES ('alsdkllll', '2011-08-10 15:29:16.873016', '2011-08-10 
15:29:16.873016')
Call part: select_one_or_new_dialog_select. this-id = :unit, locals = []
         : form_field_path = ["location_material", "unit"]
Completed   in 701ms

ArgumentError (invalid typed-id: :unit):
  app/controllers/units_controller.rb:8:in `create'


Note units_controller.rb:8 is the hobo_create do line.

Bob

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/hobousers/-/7-cgqEdX8LAJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to