Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add a proxy_association method to association proxies, which can be called ↵ | Jon Leighton | 2011-07-27 | 1 | -0/+6 |
| | | | | by association extensions to access information about the association. This replaces proxy_owner etc with proxy_association.owner. | ||||
* | :joins => joins | Akira Matsuda | 2011-07-08 | 1 | -12/+12 |
| | |||||
* | :include => includes | Akira Matsuda | 2011-07-08 | 1 | -7/+7 |
| | |||||
* | find(:first) => first | Akira Matsuda | 2011-07-08 | 1 | -5/+5 |
| | |||||
* | find(:all) => all | Akira Matsuda | 2011-07-08 | 1 | -18/+18 |
| | |||||
* | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-06-06 | 1 | -4/+4 |
|\ | | | | | | | | | Conflicts: activerecord/RUNNING_UNIT_TESTS | ||||
| * | Fix font styling on associations.rb | Sebastian Martinez | 2011-05-26 | 1 | -4/+4 |
| | | |||||
* | | Corrected some typos and American vs. Queen's English issues | Lee Reilly | 2011-05-29 | 1 | -1/+1 |
| | | |||||
* | | Removes the restriction on primary key when joining in a habtm && test that ↵ | Mohammad El-Abid | 2011-05-26 | 1 | -6/+0 |
|/ | | | | it was properly removed | ||||
* | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-05-25 | 1 | -30/+32 |
|\ | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/core_ext/kernel/requires.rb | ||||
| * | has_many :dependent => :restrict raises an exception but is not documented ↵ | Aditya Sanghi | 2011-05-22 | 1 | -2/+4 |
| | | | | | | | | appropriately. has_one also has :dependent => :restrict but is not documented at all. | ||||
| * | Changing examples: use 'each' instead of 'for in' | Guillermo Iguaran | 2011-05-19 | 1 | -4/+4 |
| | | |||||
| * | Remove extra white-spaces. | Sebastian Martinez | 2011-05-19 | 1 | -24/+24 |
| | | |||||
* | | Remove extra white spaces. | Sebastian Martinez | 2011-05-19 | 1 | -3/+3 |
| | | |||||
* | | Implement proxy_owner, proxy_target and proxy_reflection methods on ↵ | Jon Leighton | 2011-05-19 | 1 | -5/+6 |
|/ | | | | CollectionProxy with deprecations. Fixes #1148. | ||||
* | :touch => :symbol also updates the updated_at attribute | Bruno Michel | 2011-05-10 | 1 | -1/+1 |
| | |||||
* | Abstract some common code from AssociationScope and ↵ | Jon Leighton | 2011-03-11 | 1 | -0/+1 |
| | | | | JoinDependency::JoinAssociation into a JoinHelper module | ||||
* | Move the code which builds a scope for through associations into a generic ↵ | Jon Leighton | 2011-03-10 | 1 | -3/+4 |
| | | | | AssociationScope class which is capable of building a scope for any association. | ||||
* | Merge branch 'master' into nested_has_many_through | Jon Leighton | 2011-03-04 | 1 | -554/+207 |
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activerecord/CHANGELOG activerecord/lib/active_record/association_preload.rb activerecord/lib/active_record/associations.rb activerecord/lib/active_record/associations/class_methods/join_dependency.rb activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb activerecord/lib/active_record/associations/has_many_association.rb activerecord/lib/active_record/associations/has_many_through_association.rb activerecord/lib/active_record/associations/has_one_association.rb activerecord/lib/active_record/associations/has_one_through_association.rb activerecord/lib/active_record/associations/through_association_scope.rb activerecord/lib/active_record/reflection.rb activerecord/test/cases/associations/has_many_through_associations_test.rb activerecord/test/cases/associations/has_one_through_associations_test.rb activerecord/test/cases/reflection_test.rb activerecord/test/cases/relations_test.rb activerecord/test/fixtures/memberships.yml activerecord/test/models/categorization.rb activerecord/test/models/category.rb activerecord/test/models/member.rb activerecord/test/models/reference.rb activerecord/test/models/tagging.rb | ||||
| * | Move JoinDependency and friends from ↵ | Jon Leighton | 2011-02-28 | 1 | -2/+2 |
| | | | | | | | | ActiveRecord::Associations::ClassMethods to just ActiveRecord::Associations | ||||
| * | Rewrote AssociationPreload. | Jon Leighton | 2011-02-28 | 1 | -0/+2 |
| | | |||||
| * | Use proper objects to do the work to build the associations (adding methods, ↵ | Jon Leighton | 2011-02-21 | 1 | -387/+22 |
| | | | | | | | | callbacks etc) rather than calling a whole bunch of methods with rather long names. | ||||
| * | merges docrails | Xavier Noria | 2011-02-18 | 1 | -1/+1 |
| |\ | |||||
| | * | Fix Typos: remove several occurences of the the | Nicholas Rowe | 2011-02-17 | 1 | -1/+1 |
| | | | |||||
| * | | Split AssociationProxy into an Association class (and subclasses) which ↵ | Jon Leighton | 2011-02-18 | 1 | -34/+30 |
| | | | | | | | | | | | | manages the association, and a CollectionProxy class which is *only* a proxy. Singular associations no longer have a proxy. See CHANGELOG for more. | ||||
| * | | Allow building and then later saving has_many :through records, such that ↵ | Jon Leighton | 2011-02-18 | 1 | -7/+31 |
| | | | | | | | | | | | | the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved] | ||||
| * | | Ensure that association_ids uses the correct attribute where the association ↵ | Jon Leighton | 2011-02-18 | 1 | -2/+5 |
| | | | | | | | | | | | | is a has_many :through with a :primary_key option on the source reflection. [#6376 state:resolved] | ||||
| * | | Documentation for recent refinements to association deletion | Jon Leighton | 2011-02-07 | 1 | -3/+75 |
| | | | |||||
| * | | Support the :dependent option on has_many :through associations. For ↵ | Jon Leighton | 2011-02-07 | 1 | -2/+1 |
| |/ | | | | | | | historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association. | ||||
| * | Merge branch 'master' of git://github.com/lifo/docrails | Xavier Noria | 2011-02-05 | 1 | -1/+1 |
| |\ | |||||
| | * | keep options titles consistent to "Options" | Gabriel Horner | 2011-02-03 | 1 | -1/+1 |
| | | | |||||
| * | | Fixing ordering of HABTM association deletion [#6191 state:resolved] | Edward Faulkner | 2011-02-04 | 1 | -1/+1 |
| |/ | | | | | | | Signed-off-by: Santiago Pastorino <santiago@wyeworks.com> | ||||
| * | Removed support for accessing attributes on a has_and_belongs_to_many join ↵ | Jon Leighton | 2011-01-16 | 1 | -6/+0 |
| | | | | | | | | table. This has been documented as deprecated behaviour since April 2006. Please use has_many :through instead. A deprecation warning will be added to the 3-0-stable branch for the 3.0.4 release. | ||||
| * | Abstract common code from BelongsToAssociation and HasOneAssociation into ↵ | Jon Leighton | 2011-01-16 | 1 | -0/+1 |
| | | | | | | | | SingularAssociation | ||||
| * | Document the new create_association! method on one-to-one associations | Jon Leighton | 2011-01-16 | 1 | -1/+9 |
| | | |||||
| * | Add create_association! for belongs_to | Jon Leighton | 2011-01-16 | 1 | -3/+3 |
| | | |||||
| * | Support for create_association! for has_one associations | Jon Leighton | 2011-01-11 | 1 | -0/+1 |
| | | |||||
| * | Refactor the code for singular association constructors. This will allow me ↵ | Jon Leighton | 2011-01-11 | 1 | -8/+13 |
| | | | | | | | | to define a create_association! method in a minute. | ||||
| * | It's not necessary to pass the association proxy class around now | Jon Leighton | 2011-01-11 | 1 | -22/+15 |
| | | |||||
| * | Get rid of set_association_target and association_loaded? as the parts of ↵ | Jon Leighton | 2011-01-11 | 1 | -12/+0 |
| | | | | | | | | the code that need that can now just use association_proxy(:name).loaded?/target= | ||||
| * | DRY up the code which instantiates the association proxy | Jon Leighton | 2011-01-11 | 1 | -35/+24 |
| | | |||||
| * | Document the recent changes to association assignment | Jon Leighton | 2011-01-11 | 1 | -4/+9 |
| | | |||||
| * | Return value is irrelevant here as the RHS of the assignment is always ↵ | Jon Leighton | 2011-01-11 | 1 | -1/+0 |
| | | | | | | | | returned by methods ending in '=' | ||||
| * | Remove incorrect documentation about build_assoc on has_one. This is proven, ↵ | Jon Leighton | 2011-01-11 | 1 | -2/+1 |
| | | | | | | | | for example, by test_successful_build_association in has_one_associations_test.rb | ||||
| * | For a singular association, it should be build_association, rather than ↵ | Jon Leighton | 2011-01-11 | 1 | -1/+1 |
| | | | | | | | | association.build (as association may be nil) | ||||
| * | Correctly indent the bullet points under 'One-to-one associations', so that ↵ | Jon Leighton | 2011-01-11 | 1 | -10/+10 |
| | | | | | | | | the lines are not broken in the generated rdoc html | ||||
| * | Not really worth having the HasAssociation module for just a single method | Jon Leighton | 2011-01-07 | 1 | -1/+0 |
| | | |||||
| * | just use a hash for doing association caching | Aaron Patterson | 2011-01-07 | 1 | -7/+7 |
| | | |||||
| * | no need for self | Aaron Patterson | 2011-01-06 | 1 | -1/+1 |
| | | |||||
| * | Remove undocumented feature from has_one where you could pass false as the ↵ | Jon Leighton | 2011-01-03 | 1 | -8/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | second parameter to build_assoc or create_assoc, and the existing associated object would be untouched (the foreign key would not be nullified, and it would not be deleted). If you want behaviour similar to this you can do the following things: * Use :dependent => :nullify (or don't specify :dependent) if you want to prevent the existing associated object from being deleted * Use has_many if you actually want multiple associated objects * Explicitly set the foreign key if, for some reason, you really need to have multiple objects associated with the same has_one. E.g. previous = obj.assoc obj.create_assoc previous.update_attributes(:obj_id => obj.id) |