hobo 0.9.102 fails with cascading destroy on has_one
Reported by Betelgeuse | December 3rd, 2009 @ 08:52 PM | in Hobo 1.0 - Final
After upgrading to hobo 0.9.102 I have a test failing that checks that a model delete cascades properly:
undefined local variable or method `active_user' for #<FooModel:0x1051ed4c0>
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/attribute_methods.rb:260:in `method_missing_without_find_for'
/Library/Ruby/Gems/1.8/gems/hobo-0.9.102/lib/hobo/find_for.rb:48:in `method_missing'
/Library/Ruby/Gems/1.8/gems/hobo-0.9.102/lib/hobo/permissions.rb:108:in `has_one_dependent_destroy_for_test_child'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:178:in `evaluate_method'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:166:in `call'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:93:in `run'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `each'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `send'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:92:in `run'
/Library/Ruby/Gems/1.8/gems/activesupport-2.3.5/lib/active_support/callbacks.rb:276:in `run_callbacks'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:344:in `callback'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/callbacks.rb:336:in `destroy_without_transactions'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `send'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:182:in `transaction'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:228:in `with_transaction_returning_status'
/Library/Ruby/Gems/1.8/gems/activerecord-2.3.5/lib/active_record/transactions.rb:192:in `destroy_without_hobo_permission_check'
/Library/Ruby/Gems/1.8/gems/hobo-0.9.102/lib/hobo/permissions.rb:159:in `destroy'
The relation in question. For more/unsanitized info I can be contacted on IRC.
has_one :test_child, :class_name => 'Child', :dependent => :destroy
Comments and changes to this ticket
-
Betelgeuse December 3rd, 2009 @ 08:53 PM
- Title changed from hobo 0.9.102 fails with cascading deletes to hobo 0.9.102 fails with cascading destroy on has_one
-
Matt Jones December 3rd, 2009 @ 09:30 PM
- Tag changed from permissions to defect, permissions
- Assigned user set to Bryan Larsen
- Milestone set to Hobo 1.0 - Final
Looks like a variation on the theme of #528 - AR implements :dependent => :destroy in about a million little pieces.
-
Matt Jones December 7th, 2009 @ 02:21 AM
- State changed from new to resolved
(from [0f55ba0541b522cef1f84fd28ec713d3a558f818]) [#567 state:resolved] fix typos http://github.com/tablatom/hobo/commit/0f55ba0541b522cef1f84fd28ec7...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
People watching this ticket
Tags
Referenced by
- 571 No links to individual records in records in an index page for STI parent I recommend following the RSS feed for this lighthouse pr...
- 567 hobo 0.9.102 fails with cascading destroy on has_one (from [0f55ba0541b522cef1f84fd28ec713d3a558f818]) [#567 s...