search for: delete_records

Displaying 3 results from an estimated 3 matches for "delete_records".

2007 Jun 01
0
"Exception: stack level too deep" on collection.clear?
...-1.15.2/lib/active_record/ transactions.rb:121:in `transaction'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ transactions.rb:125:in `destroy'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/has_many_association.rb:168:in `delete_records'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/has_many_association.rb:168:in `each'' C:/ruby/lib/ruby/gems/1.8/gems/activerecord-1.15.2/lib/active_record/ associations/has_many_association.rb:168:in `delete_records'' C:/ruby/lib/ruby/ge...
2010 Jul 14
1
ActiveRecord::Observer, update_all and has_many
...noted that adding an item to a has_many relationship gets logged, but removing the item does not. That is: @product.users << user is logged, but: @product.users.delete(user) is not. I''ve dug into ActiveRecord and found that the underlying issue is that the HasManyAssociation delete_records method uses update_all to update the record. update_all bypasses the normal call backs and therefore also bypasses the Observer. Is there a way to get an Observer to observe update_all calls? -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to th...
2006 Jan 22
2
acts_as_taggable: weird SQL problem with untagging
Setup as follows: class Resource < ActiveRecord::Base belongs_to :user validates_presence_of :filename validates_uniqueness_of :filename, :scope => "user_id", :message => "already exists, try uploading another file or deleting first." acts_as_taggable :join_class_name => ''TagResource''