aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
Commit message (Collapse)AuthorAgeFilesLines
* Prefer find_by over dynamic finders in rdocSam Ruby2013-04-021-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-03-301-4/+4
|\ | | | | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb activerecord/test/cases/adapter_test.rb guides/source/testing.md [ci skip]
| * Minor copy editingNeeraj Singh2013-03-111-4/+4
| |
* | Fix some typos in AR- CHANGELOG, tests, method doc. fixedVipul A M2013-03-201-1/+1
| |
* | rename `Relation#uniq` to `Relation#distinct`. `#uniq` still works.Yves Senn2013-03-151-0/+1
| | | | | | | | | | | | | | | | The similarity of `Relation#uniq` to `Array#uniq` is confusing. Since our Relation API is close to SQL terms I renamed `#uniq` to `#distinct`. There is no deprecation. `#uniq` and `#uniq!` are aliases and will continue to work. I also updated the documentation to promote the use of `#distinct`.
* | document habtm join-table name with custom prefix [ci skip].Yves Senn2013-03-101-0/+2
| | | | | | | | | | | | Closes #9643. The logic was introduced with 46492949
* | Merge pull request #9630 from robertjwhitney/update_collection_docsCarlos Antonio da Silva2013-03-091-2/+2
|\ \ | |/ |/| Update documentation for collection<< to reflect behavior for new parent objects.
| * Update documentation for collection<< to reflect << on new records.Robert Whitney2013-03-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | collection<< does not automatically fire update sql unless the parent object is not a new record (and thus has a primary key). eg: p = Post.new p.comments << Comment.new does not call update sql until: p.save at which point it saves the parent object and then the collection object. changes that to the
* | TypppoAkira Matsuda2013-03-061-1/+1
|/
* Fix typoCarson McDonald2013-03-051-1/+1
|
* Updated doc to clarify about update_all and delete_allNeeraj Singh2013-02-241-2/+2
| | | | | | | | delete_all will call callbacks if depdent option is specified as :destroy. This behavior is not very clear from the documetation and hence issue #7832 was raised. closes #7832
* Fix typoTatsuro Baba2013-01-221-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-01-091-8/+8
|\ | | | | | | | | Conflicts: guides/source/getting_started.md
| * prefer american spelling of 'behavior'Gosha Arinich2013-01-071-1/+1
| |
| * remove meaningless use of Relation#allAkira Matsuda2013-01-031-2/+2
| | | | | | | | particularly, `all(options)` would warn
| * wrong model nameAkira Matsuda2013-01-021-1/+1
| |
| * find + conditions is deprecated in AR 4Akira Matsuda2013-01-021-3/+3
| |
| * find_or_create_by is deprecated in AR 4Akira Matsuda2013-01-021-2/+2
| |
* | These are already required through AS/railsAkira Matsuda2013-01-071-2/+0
|/ | | | | | * dependencies/autoload * concern * deprecation
* Deprecate Relation#sum with a block.Carlos Antonio da Silva2012-11-211-1/+1
| | | | | | | To perform a sum calculation over the array of elements, use to_a.sum(&block). Please check the discussion in f9cb645dfcb5cc89f59d2f8b58a019486c828c73 for more context.
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-11-171-53/+53
|\ | | | | | | | | Conflicts: actionpack/lib/action_dispatch/routing/redirection.rb
| * 1.9 hash syntax changesAvnerCohen2012-11-081-53/+53
| |
* | Merge pull request #8116 from senny/7993_configure_counter_cache_for_has_manyJon Leighton2012-11-091-0/+3
|\ \ | | | | | | :counter_cache option for to support custom named counter caches
| * | :counter_cache option for to support custom named counter caches. Closes #7993Yves Senn2012-11-041-0/+3
| |/
* / adding requires for constant dependenciesAaron Patterson2012-11-071-0/+3
|/
* Add CollectionAssociation#destroy to ActiveRecord::Association::ClassMethods ↵Samuel Cochran2012-10-051-3/+15
| | | | code docs
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-09-211-1/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: actionmailer/lib/action_mailer/base.rb activesupport/lib/active_support/configurable.rb activesupport/lib/active_support/core_ext/module/deprecation.rb guides/source/action_controller_overview.md guides/source/active_support_core_extensions.md guides/source/ajax_on_rails.textile guides/source/association_basics.textile guides/source/upgrading_ruby_on_rails.md While resolving conflicts, I have chosen to ignore changes done in docrails at some places - these will be most likely 1.9 hash syntax changes.
| * Add extra note about :dependent => :destroy.Steve Klabnik2012-09-211-1/+4
| | | | | | | | Callbacks may interfere with each other.
| * Doc typo: depenent -> dependent; trailing ws.Henrik N2012-09-161-2/+2
| |
| * Improve documentation about :dependent and callbacks.Steve Klabnik2012-09-151-0/+5
| | | | | | | | Fixes #3458.
* | Improve exception message for HasManyThroughAssociationPolymorphicSourceErrorSebastian Korfmann2012-09-101-1/+1
|/ | | | | Exception message was misleading, as it is possible to have a polymorphic 'has_many :through' join model.
* Update the documentation for the :autosave optionDavid Celis2012-08-231-1/+3
| | | | | | | | | | | I've noticed a caveat with the :autosave option biting people before. Questions arise about why they must explicitly save an associated object in their own before_save callbacks. I've updated the documentation as such to note to users that the :autosave callback occurs before any user defined callbacks. They must save the associated record themselves if altering it in their own callbacks. Signed-off-by: David Celis <david@davidcelis.com>
* fixup guides in light of :dependent changesJon Leighton2012-08-101-7/+7
|
* Remove the dependent_restrict_raises option.Jon Leighton2012-08-101-11/+16
| | | | | | | | | | | | | | | It's not really a good idea to have this as a global config option. We should allow people to specify the behaviour per association. There will now be two new values: * :dependent => :restrict_with_exception implements the current behaviour of :restrict. :restrict itself is deprecated in favour of :restrict_with_exception. * :dependent => :restrict_with_error implements the new behaviour - it adds an error to the owner if there are dependent records present See #4727 for the original discussion of this.
* Update the docs to reflect the new association APIJon Leighton2012-08-031-190/+80
|
* load active_support/core_ext/module/delegation in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/class/attribute in active_support/railsXavier Noria2012-08-021-1/+0
|
* load active_support/core_ext/object/blank in active_support/railsXavier Noria2012-08-021-1/+0
|
* Revert "Remove :finder_sql, :counter_sql, :insert_sql, :delete_sql."Jon Leighton2012-08-011-0/+31
| | | | | | | | | This reverts commit 3803fcce26b837c0117f7d278b83c366dc4ed370. Conflicts: activerecord/CHANGELOG.md It will be deprecated only in 4.0, and removed properly in 4.1.
* Explaining a bit better about the default behaviour of dependentRodrigo Flores2012-07-281-1/+2
|
* Missed extend for eager_autoloadDmitry Vorotilin2012-07-261-0/+1
|
* Merge pull request #7161 from ↵Jon Leighton2012-07-261-5/+7
|\ | | | | | | | | michaelfairley/eager_load_active_record_association_helpers Eager autoload ActiveRecord association helpers
| * Eager autoload ActiveRecord association helpersMichael Fairley2012-07-251-5/+7
| |
* | Remove :finder_sql, :counter_sql, :insert_sql, :delete_sql.Jon Leighton2012-07-201-31/+0
| |
* | Avoid options ever being nilJon Leighton2012-07-201-4/+4
| | | | | | | | This fixes active_record_deprecated_finders.
* | Allow associations to take a lambda which builds the scopeJon Leighton2012-07-131-8/+8
| |
* | Mention effect of accepts_nested_attributes_for on association autosave ↵Chris Gunther2012-06-271-0/+8
| | | | | | | | option [ci skip]
* | Update AR has_one association exampleAlexey Vakhov2012-05-161-1/+1
| |
* | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-05-041-8/+8
|\ \
| * | simpler wording and explanationsHrvoje Šimić2012-05-011-8/+8
| | |