Commit Graph

64 Commits

Author SHA1 Message Date
Robin Dupret
803ef74f9b Tiny documentation edits [ci skip] 2015-02-24 22:22:15 +01:00
Josef Šimánek
6576f7354e Require belongs_to by default.
Deprecate `required` option in favor of `optional` for belongs_to.
2015-02-21 23:03:10 +01:00
Konstantinos Rousis
6ef2ce0aed Replace deprecated readonly option with scope blocks in docs and guide 2015-02-18 09:44:43 +01:00
Vijay Dev
95546d4935 Merge branch 'master' of github.com:rails/docrails 2015-02-14 15:35:47 +00:00
Juanito Fatas
773dd2598d [ci skip] Add some more code highlights. 2015-02-10 22:42:41 +08:00
Andrey Nering
017de712ee Add Single Table Inheritance to guides [ci skip] 2015-01-31 17:07:14 -02:00
Juanito Fatas
fa3108a9ef [ci skip] Add a missing space in t.belongs_to argument. 2015-01-29 15:30:47 +08:00
Vipul A M
5cfaf5a46e - Changed IN to ON in markdown renderer condition
- Changed `IN` to `ON` in all note sentences in guides.
2015-01-14 11:52:13 +05:30
Robin Dupret
73fe108d70 Minor documentation edits [ci skip] 2014-12-28 22:55:09 +01:00
Xavier Noria
7702974281 warn about reading guides in GitHub
References #18148.
2014-12-23 23:32:50 +01:00
Steve Lounsbury
d60556e967 You need to specify the counter_cache option on the has_many side of the association when using a custom counter cache column. This is documented on the has_many association here: http://apidock.com/rails/ActiveRecord/Associations/ClassMethods/has_many [ci skip] 2014-12-16 01:58:19 +00:00
Zachary Scott
6b96a1eae1 Add null option to timestamps as migration generator does [ci skip] 2014-12-14 20:42:38 -05:00
Aaron Huang
263e9e4681 [ci skip] Remove outdate note of :dependent 2014-11-28 01:34:33 +08:00
Juanito Fatas
29366cdad7 [ci skip] Fix some typos, normalize sentence.
Follow up of #16722.

https://github.com/rails/rails/pull/16722

also normalize all instance gained methods’ sentence.
2014-09-08 03:29:48 +08:00
Rafael Mendonça França
17a39c841d Merge pull request #16722 from yui-knk/fix/guides_association_basics2
[ci skip] Fix typo of `collection_singular_ids=` method.
2014-08-27 10:49:48 -03:00
yui-knk
2d2cd7e648 [ci skip] Fix typo of collection= method. 2014-08-27 22:37:56 +09:00
yui-knk
277355ade0 [ci skip] Fix typo of collection_singular_ids= method. 2014-08-27 22:34:52 +09:00
Matt Warren
0f9118ab6f adding indexes on tables in migration scripts
missed one migration script in last commit

remove some empty lines

using the belongs_to index option to be more concise
2014-07-24 19:18:00 -02:30
Nishant Modak
da5ac71885 correct markdown usage [ci skip] 2014-07-09 01:32:44 +05:30
John Kelly Ferguson
d02c810e29 Rename Posts to Articles in Guides, continuation of 2d446e77 / #13774 [ci skip] 2014-05-21 23:01:45 -04:00
Juanito Fatas
982a19edc9 [ci skip] Use plain underscore instead of "\_". 2014-04-13 23:56:59 +08:00
Rohit Paul Kuruvilla
464d47eaaf Updated association_basics.md [ci skip]
Updated association_basics.md to include how to write migrations for self joins

Update association_basics.md

Corrected the update

Update association_basics.md

Typo fix

Changed :employee to :manager
2014-01-31 11:31:19 +05:30
Kuldeep Aggarwal
647cff3a13 updating options documentation for associations
removed unnecessary test case and improved test case for belongs_to having invalid  options
2013-11-29 18:49:56 +05:30
Juanito Fatas
01d75f038e [ci skip] Fix number of methods added by association.
Also clean up some trailing spaces on line 1143-1146.
2013-10-17 02:45:04 +08:00
Ofer Nave
803ecc7334 added "id: false" to HABTM join table example
Based on the instructions further down in section 3.3.2.
2013-09-24 20:34:50 -04:00
Rafael Mendonça França
83b92c67cc Fix the model name in the association basics guides
[ci skip]
2013-09-23 15:27:43 -03:00
Xavier Noria
b77f25cb84 cleans the guides sources from fancy non-ASCII stuff 2013-08-23 17:59:11 +02:00
Ilya Vorontsov
ac02c190a5 Added comment to a guide about necessity of :dependent option for associations with NOT NULL constraint 2013-08-12 17:50:35 +04:00
Gaurish Sharma
e54c225b16 [Fixes #11734]Correct Association Basics Guide on has_and_belongs_to_many[ci skip]
Done the following changes:
 1. Replace uniq call in example with autosave as uniq is not supported
 on has_and_belongs_to_many
 2. Add :readonly option to list of supported call as per
 [EdgeApi](http://edgeapi.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_and_belongs_to_many)
2013-08-03 20:08:20 +05:30
Daniel Dawson
8cece08ce3 Fix a grammatical error/typo in Active Record Associations guide. 2013-07-11 12:09:59 +01:00
Cristian Planas
93fd780a88 Using preferred find_by syntax in guides 2013-07-01 01:38:46 +02:00
Mikhail Dieterle
1010f9382b fix quotes and ruby old hashes 2013-06-15 18:39:17 +03:00
Mikhail Dieterle
d4794fd9d2 Use markdown quotes instead <tt> tag 2013-06-15 18:09:07 +03:00
Matthew Hensrud
f1d453b4fd Added bang method versions to association basics guide 2013-06-07 17:37:02 -04:00
Sunny Ripert
666d028bb8 End-of-line whitespace hunt 2013-05-28 14:38:01 +02:00
Neeraj Singh
54ce21ee8d Added an example for primary_key option 2013-05-22 10:37:37 -04:00
wangjohn
346cda4f34 Adding documentation to the automatic inverse_of finder. 2013-05-11 23:05:36 -04:00
wangjohn
de12a6a0ef Changed the guides to use distinct instead of uniq for associations (see
commit a1bb6c8b which changes the naming). I've also provided an
example of how distinctness when inserting into an association can be
achieved.
2013-04-02 14:48:42 -04:00
Chao Ren
a2bb6720fd Typo: Migration class name would use plural 2013-03-23 20:57:14 -07:00
Akira Matsuda
2fb1cdd0a5 Typppo 2013-03-06 03:56:36 +09:00
David Deller
b7d50f352f Add explanation of :dependent => :restrict
Based on information here: http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many
2013-03-01 18:05:18 -05:00
Rafael Mendonça França
c5fb487965 Merge pull request #8432 from rmcastil/add_migration_example_to_each_association_type
Add migration examples to Association Basics

[ci skip]
2012-12-13 09:44:13 -08:00
Ryan Castillo
312234c578 Add migration example to Association Basics [ci skip] 2012-12-13 12:27:39 -05:00
Katie Oldaker
fc6336d1be Punctuation, capitalization, grammar fixes in rails guides 2012-12-07 16:32:06 -05:00
Katie Oldaker
7c05ea23a0 Fixed grammar in a lot of guide prologues. 2012-12-07 12:50:09 -05:00
Steve Klabnik
d16a1b9e8b Normalize on 'After reading this guide, you will know:'
We have three or four different introduction sentences to the guides.
After this commit, we use the same one everywhere.
2012-11-29 14:25:02 -08:00
Steve Klabnik
87b5d53e2f Associations: s/A Guide//
It's obvious that this is a guide, and none of the other guides say 'A Guide to'.
2012-11-29 05:27:09 -08:00
Steve Klabnik
6dcae8ae9c Add periods to the bullet points in guides.
Talked with @fxn about this. Bullet points should have periods at the ends.
2012-11-29 05:14:08 -08:00
Vijay Dev
1fd008cd44 copy edits and fixes [ci skip] 2012-11-17 01:42:38 +05:30
Agis Anastasopoulos
4ce16908c3 Switch to 1.9 hash syntax plus minor fixes 2012-11-15 23:47:02 +02:00