aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_basics.md
Commit message (Collapse)AuthorAgeFilesLines
* Refer to rails command instead of rake in a bunch of placesDavid Heinemeier Hansson2015-12-181-2/+2
| | | | Still more to do. Please assist!
* Fix documentation about ApplicationRecordRafael Mendonça França2015-12-161-1/+1
| | | | [ci skip]
* Introduce ApplicationRecord, an Active Record layer supertypeGenadi Samokovarov2015-12-161-7/+8
| | | | | | | | | | | | | | | | It's pretty common for folks to monkey patch `ActiveRecord::Base` to work around an issue or introduce extra functionality. Instead of shoving even more stuff in `ActiveRecord::Base`, `ApplicationRecord` can hold all those custom work the apps may need. Now, we don't wanna encourage all of the application models to inherit from `ActiveRecord::Base`, but we can encourage all the models that do, to inherit from `ApplicationRecord`. Newly generated applications have `app/models/application_record.rb` present by default. The model generators are smart enough to recognize that newly generated models have to inherit from `ApplicationRecord`, but only if it's present.
* Use a real migration version number in docsMatthew Draper2015-12-151-1/+1
| | | | | Even though this means more things to change when we bump after a release, it's more important that our examples are directly copyable.
* Use a deliberately-invalid migration version in all doc examplesMatthew Draper2015-12-151-1/+1
| | | | | | | | | | 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] SQL is written using statements, not sentencesBrooks Reese2015-08-131-1/+1
|
* docs, use hash instead of a string for `order`. [ci skip]Yves Senn2015-08-101-1/+1
| | | | Closes #21121
* Grammar fix to Active Record Basics guide. [ci skip]Brian Davis2015-05-241-2/+2
|
* - Make example code consistent for better understanding. [ci skip]Santosh Wadghule2015-03-181-5/+5
|
* Fix wrong model name for 'Articles', It should be 'Article' [ci skip]Santosh Wadghule2015-03-181-1/+1
| | | | - Also changed 'a' to 'an' for 'Article' word.
* [ci skip] Fix dead linkyui-knk2015-03-161-1/+1
| | | | | | | getting_started.html#the-mvc-architecture is lost by this commit 2f06c94e38a116fdfa43d7b7117e6bf911a0bff5 (Mar 14 2012 !). So replace it with wikipedia link.
* [ci skip] Fix `Object-Relational` to `Object Relational`yui-knk2015-02-241-1/+1
|
* Merge pull request #18503 from vipulnsward/guides-in-onXavier Noria2015-01-141-1/+1
|\ | | | | Changed `IN` to `ON` in markdown renderer condition
| * - Changed `IN` to `ON` in markdown renderer conditionVipul A M2015-01-141-1/+1
| | | | | | | | - Changed `IN` to `ON` in all note sentences in guides.
* | minor grammatical fix in documentationJade McGough2015-01-121-1/+1
|/
* warn about reading guides in GitHubXavier Noria2014-12-231-0/+2
| | | | References #18148.
* Add `null` option to timestamps as migration generator does [ci skip]Zachary Scott2014-12-141-1/+1
|
* Fix typo in "Active Record Basics" guide. [ci skip]nakadai2014-10-241-1/+1
|
* Update single table inheritance link anchorSu Zhang (張甦)2014-09-301-1/+1
| | | The current one is old-of-date and doesn't make the browser navigation to the correct heading.
* `create` return an active record object with erros instead of false when ↵Tony Jian2014-07-231-4/+5
| | | | validation fails. [skip ci]
* Rename Posts to Articles in Guides, continuation of 2d446e77 / #13774 [ci skip]John Kelly Ferguson2014-05-211-9/+9
|
* fixed typos in active_record basics [skip ci]vanderhoop2014-05-071-2/+2
|
* Some fixes in docs [ci skip]Malav Bhavsar2013-10-111-1/+1
| | | | | | Update a link to point to right section in api docs Fix a typo
* [ci skip] Add missing periods and update link name and some wording.Juanito Fatas2013-09-261-11/+11
|
* Plural of Deer not deerSergio2013-09-101-1/+1
| | | Change the plural of Deer word in the naming conventions
* Removing instances of string class_names in fixtures.wangjohn2013-08-241-1/+1
| | | | | | | Also, constantizing the default_fixture_model_name when it gets loaded in from the file. Later, when the class_name is passed to a new FixtureSet, a deprecation warning will occur if the class_name is a string.
* Remove set_primary_key, replace with primary_key=Luka Marčetić2013-08-211-2/+2
| | | First deprecated, now removed: https://github.com/rails/rails/commit/9add7608f1acaa68b025470e7a38901d7e6161ca#activerecord/lib/active_record/attribute_methods/primary_key.rb
* Fix 2 grammatical errors/typos in Active Record Basics guide. [ci skip]Daniel Dawson2013-07-081-2/+2
|
* Using preferred find_by syntax in guidesCristian Planas2013-07-011-4/+4
|
* correction standr => standard of commits @0435d0eRajarshi Das2013-06-061-1/+1
|
* reword for grammar and clarityGraham Madden2013-05-311-3/+3
|
* Change deprecated validates_presence_ofZoltan Debre2013-04-051-1/+1
| | | In Validations section the example contained "validates_presence_of" which is deprecated. It should be "validates :name, presence: true"
* add `(association)`_type to schema convetions in AR basics guide.Yves Senn2013-04-031-0/+2
|
* link the Active Record pattern to the EAA CatalogYves Senn2013-04-031-4/+5
|
* remove trailing whitespace from AR Basics guideYves Senn2013-04-031-94/+94
|
* Update guides/source/active_record_basics.mdBenoit Caccinolo2013-01-111-1/+1
|
* Merge branch 'master' of github.com:lifo/docrailsVijay Dev2013-01-091-2/+2
|\ | | | | | | | | Conflicts: guides/source/getting_started.md
| * A Relation is not a collection of records. So let's not use the term "record"Akira Matsuda2013-01-041-2/+2
| |
| * .all does not return an ArrayAkira Matsuda2013-01-041-1/+1
| |
* | Change guides to use update instead of update_attributesAmparo Luna + Guillermo Iguaran2013-01-031-3/+3
|/
* General refreshment of the Active Record Basics guidePablo Torres2012-12-121-42/+182
|
* Fix Active Record validation error messages markup in guidesCarlos Antonio da Silva2012-12-041-21/+21
| | | | | | | | | | The other way it was not marking the text as italic, it was showing the underlines as normal text. Also fixes some code examples indentation and # => marks in Active Model and Active Record guides. [ci skip]
* Normalize on 'After reading this guide, you will know:'Steve Klabnik2012-11-291-1/+3
| | | | | We have three or four different introduction sentences to the guides. After this commit, we use the same one everywhere.
* Add periods to the bullet points in guides.Steve Klabnik2012-11-291-5/+5
| | | | Talked with @fxn about this. Bullet points should have periods at the ends.
* Switch to 1.9 hash syntaxAgis Anastasopoulos2012-11-151-3/+3
|
* Fix the usage of `*` in MarkdownPrem Sichanugrist2012-09-171-4/+4
| | | | | In Textile `*` would convert to `<strong>`, but in Markdown we have to use `**` instead.
* Convert all tables to Markdown syntaxPrem Sichanugrist2012-09-171-6/+7
|
* Convert all the links into Markdown formatPrem Sichanugrist2012-09-171-8/+8
|
* Convert all inline codes to Markdown syntaxPrem Sichanugrist2012-09-171-28/+28
|
* Convert heading tags and heading sectionPrem Sichanugrist2012-09-171-19/+28
|