Martin Andert
Not a member
Martin Andert's latest activity
Monday, March 16 2009
2251
AssociationCollection#destroy should only delete join table records
was updated
in Ruby on Rails
-
- Tag changed from activerecord, associations, destroy, has_many_through, patch, tested to activerecord, associations, destroy, has_many_through
Eloy, wouldn't it be better to do
def destroy(*records) delete_records(flatten_deeper(records)) super endinstead of
def destroy(*records) del... -
Martin Andert commented at 11:07 AMThe latter was designed for always destroy the association endpoint.
Okay. I should have read the documenting comments more conscientious.
-
-
Martin Andert commented at 8:04 AMI found some unexpected behavior dealing with
has_many :throughassociations. Given the following:class Post < ActiveRecord::Base has_many :taggings h...
Sunday, March 15 2009
1843
Calling delete on a has_many :through association does not call destroy on th...
was updated
in Ruby on Rails
-
Martin Andert commented at 7:52 PMCommit 47bdf3bf40ec17e1f8ca1c0e3d7f697d0c4cd1bf added a
destroymethod toAssociationCollection. Now I can callgroup.assigned_contents.destroy contentins...
Monday, February 02 2009
1843
Calling delete on a has_many :through association does not call destroy on th...
was updated
in Ruby on Rails
-
Martin Andert commented at 11:15 AMForgot the Annotation model above:
class Annotation < ActiveRecord::Base belongs_to :group_content_assignment endTo make things clearer...
group.as... -
Martin Andert created the ticket at 11:03 AMHere is an example:
class GroupContentAssignment < ActiveRecord::Base belongs_to :group belongs_to :content, :counter_cache => true has_many :an...