Hi,
I'm usgin two auto-complete forms similar to the one in Agile to add
members to the project.
I added :accessible => true in the xyzMembership classes:
belongs_to :xyz, :accessible => true
belongs_to :user, :accessible => true
The memberships are now created but I get a new exception refreshing
the table-plus.
Thanks!
Processing ChampionshipMembershipsController#create (for 127.0.0.1 at
2008-12-09 13:21:59) [POST]
Parameters: {"page_path"=>"championships/show",
"authenticity_token"=>"b8585ee9795c777096e71691664e6ee0a9d3547a",
"render"=>{"0"=>{"id"=>"members",
"part_context"=>"BAhbCDoMbWVtYmVycyIaY2hhbXBpb25zaGlwOjgyNzcxMDk4WwA=--018c9358d91d0c4092a459e31c4345734083a661\n"},
"1"=>{"id"=>"games",
"part_context"=>"BAhbCDoKZ2FtZXMiGmNoYW1waW9uc2hpcDo4Mjc3MTA5OFsA--2cd299c5ae1777b89010f0a744861562c24e9526\n"}},
"championship_membership"=>{"user"=>"default_user",
"championship_id"=>"82771098"}}
[4;35;1mUser Load (0.0ms) [0m [0mSELECT * FROM "users" WHERE
("users"."id" = 541702176) [0m
[4;36;1mUser Load (0.0ms) [0m [0;1mSELECT * FROM "users" WHERE
("users"."name" = 'default_user') LIMIT 1 [0m
[4;35;1mChampionship Load (0.0ms) [0m [0mSELECT * FROM
"championships" WHERE ("championships"."id" = 82771098) [0m
[4;36;1mChampionshipMembership Create (0.0ms) [0m [0;1mINSERT
INTO "championship_memberships" ("score", "updated_at",
"championship_id", "user_id", "created_at") VALUES(0, '2008-12-09
13:21:59', 82771098, 604847718, '2008-12-09 13:21:59') [0m
Call part: members. this-id = championship:82771098, locals = []
[4;35;1mChampionship Load (0.0ms) [0m [0mSELECT * FROM
"championships" WHERE ("championships"."id" = 82771098) [0m
NoMethodError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.member_class):
vendor/plugins/hobo/hobo/taglibs/rapid_plus.dryml:3:in
`table_without_search_without_a583f05e4422'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
339:in `_tag_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
259:in `new_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
339:in `_tag_context'
vendor/plugins/hobo/hobo/taglibs/rapid_plus.dryml:1:in
`table_without_search_without_a583f05e4422'
app/views/taglibs/application.dryml:46:in `table_without_search'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
337:in `_tag_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
278:in `new_object_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
259:in `new_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
266:in `new_object_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
337:in `_tag_context'
app/views/taglibs/application.dryml:45:in `table_without_search'
app/views/championships/show.dryml:4:in `members_part'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
259:in `new_context'
app/views/championships/show.dryml:4:in `members_part'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
169:in `send'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
169:in `refresh_part'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
278:in `new_object_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
259:in `new_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
266:in `new_object_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
186:in `with_part_context'
/vendor/plugins/hobo/hobo/lib/hobo/dryml/template_environment.rb:
168:in `refresh_part'
/vendor/plugins/hobo/hobo/lib/hobo/controller.rb:92:in
`__instance_exec0'
/vendor/plugins/hobo/hobo/lib/hobo/controller.rb:87:in `each'
/vendor/plugins/hobo/hobo/lib/hobo/controller.rb:87:in
`__instance_exec0'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/core_ext/object/extending.rb:74:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/core_ext/object/extending.rb:74:in `instance_exec'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
helpers/prototype_helper.rb:587:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
helpers/capture_helper.rb:129:in `with_output_buffer'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_view/
helpers/prototype_helper.rb:586:in `initialize'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:932:in `new'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:932:in `render_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:51:in `render_without_hobo_model'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/core_ext/benchmark.rb:8:in `realtime'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:51:in `render_without_hobo_model'
/vendor/plugins/hobo/hobo/lib/hobo/model_controller.rb:752:in
`render'
/vendor/plugins/hobo/hobo/lib/hobo/controller.rb:85:in
`ajax_update_response'
/vendor/plugins/hobo/hobo/lib/hobo/controller.rb:73:in
`hobo_ajax_response'
/vendor/plugins/hobo/hobo/lib/hobo/model_controller.rb:534:in
`create_response'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/mime_responds.rb:135:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/mime_responds.rb:135:in `custom'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/mime_responds.rb:164:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/mime_responds.rb:164:in `respond'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/mime_responds.rb:158:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/mime_responds.rb:158:in `respond'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/mime_responds.rb:107:in `respond_to'
/vendor/plugins/hobo/hobo/lib/hobo/model_controller.rb:532:in
`create_response'
/vendor/plugins/hobo/hobo/lib/hobo/model_controller.rb:495:in
`hobo_create'
/vendor/plugins/hobo/hobo/lib/hobo/model_controller.rb:156:in
`create'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:1253:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:1253:in `perform_action_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:617:in `call_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:638:in `run_before_filters'
/vendor/plugins/hobo/hobo/lib/hobo/controller.rb:22:in `call'
/vendor/plugins/hobo/hobo/lib/hobo/controller.rb:22:in
`included_in_class'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/callbacks.rb:182:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/callbacks.rb:182:in `evaluate_method'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:184:in `call'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:635:in `run_before_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:615:in `call_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:610:in `perform_action_without_benchmark'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/benchmarking.rb:68:in
`perform_action_without_rescue'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/rescue.rb:136:in `perform_action_without_caching'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/caching/sql_cache.rb:13:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/connection_adapters/abstract/query_cache.rb:34:in
`cache'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/query_cache.rb:8:in `cache'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/caching/sql_cache.rb:12:in `perform_action'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:524:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:524:in `process_without_filters'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/filters.rb:606:in
`process_without_session_management_support'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/session_management.rb:134:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/base.rb:392:in `process'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:183:in `handle_request'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:110:in `dispatch_unlocked'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:123:in `dispatch'
c:/ruby/lib/ruby/1.8/thread.rb:135:in `synchronize'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:122:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:132:in `dispatch_cgi'
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/dispatcher.rb:39:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:
103:in `handle_dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:
74:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:104:in `service'
c:/ruby/lib/ruby/1.8/webrick/httpserver.rb:65:in `run'
c:/ruby/lib/ruby/1.8/webrick/server.rb:173:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:162:in `start_thread'
c:/ruby/lib/ruby/1.8/webrick/server.rb:95:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `each'
c:/ruby/lib/ruby/1.8/webrick/server.rb:92:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:23:in `start'
c:/ruby/lib/ruby/1.8/webrick/server.rb:82:in `start'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/webrick_server.rb:
60:in `dispatch'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/servers/
webrick.rb:66
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:521:in `new_constants_in'
c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/
active_support/dependencies.rb:153:in `require'
c:/ruby/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/commands/server.rb:
49
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`gem_original_require'
c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`require'
./script/server:3
-e:2:in `load'
-e:2
Rendered c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/templates/rescues/_trace (375.0ms)
Rendered c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/templates/rescues/_request_and_response (0.0ms)
Rendering c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/
action_controller/templates/rescues/layout.erb (internal_server_error)
On Dec 9, 1:04 pm, Tom Locke <[EMAIL PROTECTED]> wrote:
> Whenever you don't have :accessible => true somewhere where you need
> it, you will get an exception like:
>
> > ActiveRecord::AssociationTypeMismatch (User expected, got String):
>
> So that is *probably* the problem
>
> Tom
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
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
-~----------~----~----~----~------~----~------~--~---