Displaying 2 results from an estimated 2 matches for "association_constructor_method".
2006 Aug 16
0
acts_as_paranoid and alias_method_chain
...ions.delete :with_deleted
returning belongs_to_without_deleted(association_id, options) do
if with_deleted
reflection = reflect_on_association(association_id)
association_accessor_methods(reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:build, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:create, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
end
end
end
alias_method_chain :belongs_to, :deleted
end
ActiveRecord::Base.send :include, Caboose...
2007 Jan 28
0
problems with acts_as_paranoid (noticed while using acts_as_versioned)
...= options.delete :with_deleted
returning belongs_to_without_deleted(association_id, options) do
if with_deleted
reflection = reflect_on_association(association_id)
association_accessor_methods(reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:build, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
association_constructor_method(:create, reflection,
Caboose::Acts::BelongsToWithDeletedAssociation)
end
end
end
alias_method_chain :belongs_to, :deleted
belongs_to_without_deleted should call the original...