#567 ✓resolved
Betelgeuse

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

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.

New-ticket Create new ticket

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

Referenced by

Pages