I got the error below.
Again, I may be doing something wrong. May need to check later.
Regards,
TF
Processing GameMembershipsController#create (for 127.0.0.1 at
2008-12-09 12:57:41) [POST]
Parameters: {"page_path"=>"games/show",
"authenticity_token"=>"5aa9b5f1a33f6f2ba0de7df1679f3a1588fae691",
"render"=>{"0"=>{"id"=>"members",
"part_context"=>"BAhbCDoMbWVtYmVycyITZ2FtZTo0Mzk5NzQ4NjJbAA==--2bd86fa26cee014cdaf8b801170b9841703de304\n"},
"1"=>{"id"=>"registration-button",
"part_context"=>"BAhbCDoYcmVnaXN0cmF0aW9uX2J1dHRvbiITZ2FtZTo0Mzk5NzQ4NjJbAA==--5d773eefb489f84a37065792020d8605ba516c4f
\n"}}, "game_membership"=>{"user"=>"user_in_championship",
"game_id"=>"439974862"}}
[4;35;1mUser Load (0.0ms) [0m [0mSELECT * FROM "users" WHERE
("users"."id" = 541702176) [0m
ActiveRecord::AssociationTypeMismatch (User expected, got String):
/vendor/plugins/hobo/hobo/lib/active_record/association_proxy.rb:
20:in `raise_on_type_mismatch'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations/belongs_to_association.rb:22:in `replace'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/associations.rb:1276:in `user='
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/base.rb:2587:in `send'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/base.rb:2587:in
`attributes_without_hobo_type_conversion='
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/base.rb:2583:in `each'
c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.2.2/lib/
active_record/base.rb:2583:in
`attributes_without_hobo_type_conversion='
/vendor/plugins/hobo/hobo/lib/hobo/model.rb:430:in `send'
/vendor/plugins/hobo/hobo/lib/hobo/model.rb:430:in `attributes='
/vendor/plugins/hobo/hobo/lib/hobo/permissions.rb:144:in
`user_update_attributes'
/vendor/plugins/hobo/hobo/lib/hobo/permissions.rb:121:in
`with_acting_user'
/vendor/plugins/hobo/hobo/lib/hobo/permissions.rb:143:in
`user_update_attributes'
/vendor/plugins/hobo/hobo/lib/hobo/model_controller.rb:494: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 (219.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, 10:47 am, Tom Locke <[EMAIL PROTECTED]> wrote:
> Please grab the latest and let me know if your problems are fixed.
>
> Just to clarify on which association needs :accessible => true
>
> If you're using something like <select-many> to add items to a
> has_many :through,
>
> E.g. a group has many members through memberships, and your form has:
>
> <select-many:members/>
>
> Hopefully it makes sense that you are editing the 'members'
> association, so that's the one that needs :accessible => true.
>
> I got muddled up at one point yesterday and said it would be
> the :memberships that needed it. That's not right.
>
> 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
-~----------~----~----~----~------~----~------~--~---