| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
Updated the method counts and unified them all on numerals.
|
|\
| |
| |
| | |
Fix :inverse_of documentation
|
|/
|
|
|
|
|
|
| |
options, and is needed for bi-directionality with a scope
[ci skip] Remove :conditions opion from association basics guide
This got replaced by scopes.
|
|
|
|
|
|
| |
- Make all `ActiveRecord::Base.find` as link
- Remove redundant sentences
"It also adds the additional condition that the object must be in the collection."
|
| |
|
|\
| |
| | |
Fix indentation [ci skip]
|
| | |
|
|\ \
| |/
|/| |
[ci skip]Revert commits changing wrong place
|
| |
| |
| |
| |
| |
| | |
This reverts commits 5147ab121d628f29451c654a8c312d5a3f491ffb and 391043ab04007bfd4c4c4c8e8d3308c1eae60175.
These commits looked to intend to change documents of has_many dependent options, but actually changed documents of belongs_to dependent options.
|
| | |
|
|/ |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
| |
passing `unique` parameter to belongs_to not right,
|
|
|
|
|
|
|
|
|
|
|
| |
Rails automatically finds bi-directional associations between models
with well-named associations. However, when using non-standard naming,
you have to use :inverse_of to explicitly tell Rails about the bi-
directional association.
With reference to #27516
[ci skip]
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Because I can never remember if `collection_singular_ids=` persists
or not (it does).
[ci skip]
|
|
|
| |
Passing `true` to the association has been deprecated.
|
|
|
|
|
|
| |
Clarifies the documentation here to mean all options are for when the
relation is destroyed; also now reflects the documentation on this same
option found in the has_one section.
|
|
|
|
|
|
|
| |
- We no longer add `null: false` for timestamps columns as per
rails/rails@a939506.
- Followup of
https://github.com/rails/docrails/commit/14867b1a9af813b0147bba2ae06675137d61d77b.
|
| |
|
| |
|
|
|
|
| |
- Followup of https://github.com/rails/rails/commit/71ff088a09d429657877ddfb58985d30df63fc8a
|
|
|
|
| |
[ci skip]
|
|
|
| |
fixes #21500
|
|\
| |
| | |
Updated the guides for having a distinct has_many through at the data…
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The current example
add_index :person_articles, :article, unique: true
Does not work, the `:article` column does not exist as it will be
a join table (based on the prior example) so should use :article_id
The documentation seems to suggest that it will allow an article to
be added only once to a person via the join table, what actually
occurs is that it only allows the article to be added to one person,
at which point it should be a `belongs_to` association.
Also changed the new example to use readings based on the prior example
|
| |
| |
| |
| |
| |
| |
| | |
This is a pass over the documentation which fills the missing gaps of
`ApplicationRecord`.
[ci skip]
|
| |
| |
| |
| |
| | |
Even though this means more things to change when we bump after a
release, it's more important that our examples are directly copyable.
|
|/
|
|
|
|
|
|
|
|
| |
If we use a real version, at best that'll be an onerous update required
for each release; at worst, it will encourage users to write new
migrations against an older version than they're using.
The other option would be to leave these bare, without any version
specifier. But as that's just a variant spelling of "4.2", it would seem
to raise the same concerns as above.
|
|
|
|
| |
[ci-skip]
|
|
|
|
|
|
|
| |
Moves the definition of an association to the top of the page. I am just starting to learn Rails, and having this definition at the top instead of in the second section would be really useful.
Updates the Types of Associations section for clarity. Moves the list of associations before the explanation.
Links to wikipedia articles on Primary and Foreign keys.
|
|
|
|
|
| |
* #uniq is an alias of #distinct
* #uniq will be deprecated, see: rails/rails@adfab2dcf4003ca564d78d4425566dd2d9cd8b4f
|
|
|
|
|
|
|
| |
* A `has_many` dependant association accepts `[:destroy, :delete_all, :nullify,
:restrict_with_error, :restrict_with_exception]` as options.
Currently the documentation references `delete` instead of `delete_all`
* Adds documentation for other options
|
|
|
|
| |
The option was deprecated in 6eae366d0d2e5d5211eeaf955f56bd1dc6836758
|
| |
|
|\
| |
| | |
Change documentation for collection.build and collection.create [ci-skip]
|
| | |
|
|/ |
|
|
|
|
| |
[Robin Dupret & Shunsuke Aida]
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the guide about `has_many` `collection.clear` to indicate
the behavior for each dependent strategy according to
`collection.delete_all`.
Based on #17179, I changed the `collection.delete` docs to also
clarify the default strategy for each `hm` and `hm:t` associations.
Fixes #20170.
|
| |
|
|\
| |
| | |
association basics docs fixes
|