aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
Commit message (Collapse)AuthorAgeFilesLines
* Update instrumentation guides w/optional blockAli Ibrahim2019-03-221-0/+11
|
* Add Relation#annotate for SQL commentingMatt Yoho2019-03-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch has two main portions: 1. Add SQL comment support to Arel via Arel::Nodes::Comment. 2. Implement a Relation#annotate method on top of that. == Adding SQL comment support Adds a new Arel::Nodes::Comment node that represents an optional SQL comment and teachers the relevant visitors how to handle it. Comment nodes may be added to the basic CRUD statement nodes and set through any of the four (Select|Insert|Update|Delete)Manager objects. For example: manager = Arel::UpdateManager.new manager.table table manager.comment("annotation") manager.to_sql # UPDATE "users" /* annotation */ This new node type will be used by ActiveRecord::Relation to enable query annotation via SQL comments. == Implementing the Relation#annotate method Implements `ActiveRecord::Relation#annotate`, which accepts a comment string that will be appeneded to any queries generated by the relation. Some examples: relation = Post.where(id: 123).annotate("metadata string") relation.first # SELECT "posts".* FROM "posts" WHERE "posts"."id" = 123 # LIMIT 1 /* metadata string */ class Tag < ActiveRecord::Base scope :foo_annotated, -> { annotate("foo") } end Tag.foo_annotated.annotate("bar").first # SELECT "tags".* FROM "tags" LIMIT 1 /* foo */ /* bar */ Also wires up the plumbing so this works with `#update_all` and `#delete_all` as well. This feature is useful for instrumentation and general analysis of queries generated at runtime.
* Add mention about `process_middleware.action_dispatch` in the guide [ci skip]bogdanvlviv2019-03-201-1/+10
| | | | | We added ActiveSupport::Notifications instrumentation of the processing of each middleware in the stack, See 04ae0b0b5e594e0bb99c5cd608921745977bcdcd.
* Revert "Revert "Remove `javascripts` and `javascript_engine` options for ↵Nicholas La Roux2019-03-201-2/+0
| | | | generators""
* Revert "Remove `javascripts` and `javascript_engine` options for generators"Nicholas La Roux2019-03-191-0/+2
|
* Added release notes for changes in Railties [ci skip] (#35622)प्रथमेश Sonpatki2019-03-181-0/+63
| | | [Alex Kitchens, Prathamesh Sonpatki]
* Add `:reselect` and `:optimizer_hints` to the list of finder methodsRyuta Kamizono2019-03-181-0/+2
| | | | | | These are introduced after Rails 6.0.0 beta2. [ci skip]
* `ActiveRecord::Result#to_hash` has been renamed to `to_a` [ci skip]Ryuta Kamizono2019-03-171-2/+5
| | | | See #33912.
* Merge pull request #35530 from Rodrigora/patch-1Vipul A M2019-03-121-0/+11
|\ | | | | Add note about has_many associations callbacks [ci skip]
| * Add note about has_many associations callbacks [ci skip]Rodrigo2019-03-121-0/+11
| | | | | | | | Add a note explaining when the has_many associations callbacks will be called or not.
* | Merge pull request #34955 from bogdanvlviv/follow-up-33962Kasper Timm Hansen2019-03-111-0/+4
|\ \ | | | | | | Add `config.credentials.content_path` and `config.credentials.key_path` to the guide
| * | Add `config.credentials.content_path` and `config.credentials.key_path` to ↵bogdanvlviv2019-01-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | the guide - Fix some typos Follow up #33962
* | | [ci skip] Removed extra hyphensShailesh Kalamkar2019-03-111-4/+4
| | |
* | | Add example of the output of `rails routes --expanded` in the routing guide ↵Prathamesh Sonpatki2019-03-111-1/+28
| | | | | | | | | | | | | | | | | | | | | [ci skip] - Instead of the note at the end, added an example of how the output looks by using the expanded switch.
* | | Fix links in gemspec and docs from http to https.Abhay Nikam2019-03-097-17/+17
| | |
* | | Merge pull request #35529 from ↵Ryuta Kamizono2019-03-093-3/+3
|\ \ \ | | | | | | | | | | | | | | | | abhaynikam/35492-follow-up-to-updates-links-to-https Updated links from http to https in guides, docs, etc
| * | | Updated links from http to https in guides, docs, etcAbhay Nikam2019-03-093-3/+3
| | |/ | |/|
* | | [ci skip] Minor documentation fixes for consistencyShailesh Kalamkar2019-03-092-2/+2
| | |
* | | Guides: Fix parent class of model test example (#35065)Sean Abrahams2019-03-091-1/+3
| | | | | | | | | | | | | | | | | | | | | * Fix parent class of model test example * include ActiveJob::TestHelper [ci skip]
* | | - Remove the word painfully from documentationiarobinson2019-03-081-1/+1
|/ /
* | Update `multiline?` sample code [ci skip]soartec-lab2019-03-071-2/+2
| |
* | Corrected execution result of Enumerable#sum [ci skip]soartec-lab2019-03-071-1/+1
| |
* | Learn more about inflections[ci skip]soartec-lab2019-03-071-1/+1
| |
* | Merge pull request #35503 from samjohn/cannot-grammar-correctionXavier Noria2019-03-071-1/+1
|\ \ | | | | | | Replace “can not” with “cannot”.
| * | Replace “can not” with “cannot”.Samantha John2019-03-061-1/+1
| | |
* | | Fix incorrect identifier quoting [ci skip]Ryuta Kamizono2019-03-071-3/+3
| | |
* | | Correct the limitation about `order` with `distinct` in the guideRyuta Kamizono2019-03-071-1/+2
|/ / | | | | | | | | | | | | That is happened with `distinct`, and that is not only happened on MyS L, but also on PostgreSQL, SQL Server, and Oracle. [ci skip]
* | Update links and code examples in the guides to use HTTPS where the host ↵Nathaniel Suchy2019-03-0630-109/+109
| | | | | | | | supports it.
* | Fix guide to use correct number of files created by controller generatorrmacklin2019-03-041-1/+1
| | | | | | | | | | | | | | | | In e8546aba904fb6685ef2e61f1623c64e699a2c9c, the Getting Started guide was updated to reflect the removal of CoffeeScript stubs being generated by the controller generator. However, the comment above the table of generated files wasn't updated, so it incorrectly remained "This creates five files and one empty directory". This fixes it to now say "This creates four files and one empty directory".
* | Merge pull request #33611 from willianveiga/feature/reselect-methodAndrew White2019-03-011-0/+26
|\ \ | | | | | | Add reselect method
| * \ Merge branch 'master' into feature/reselect-methodWillian Gustavo Veiga2018-10-227-38/+74
| |\ \
| * \ \ Merge branch 'master' into feature/reselect-methodWillian Gustavo Veiga2018-10-174-14/+14
| |\ \ \
| * \ \ \ Merge branch 'master' into feature/reselect-methodWillian Gustavo Veiga2018-10-1111-46/+63
| |\ \ \ \
| * | | | | Mention reselect new method in the "Active Record Query Interface" guideWillian Gustavo Veiga2018-10-041-0/+26
| | | | | |
* | | | | | add note about idle connection reaper to 5.2 release notesZach Walton2019-02-271-0/+4
| | | | | |
* | | | | | How to use `select` is updated [ci skip]soartec-lab2019-02-241-0/+2
| | | | | |
* | | | | | Merge pull request #35367 from ↵Rafael França2019-02-221-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | abhaynikam/update-getting-started-doc-for-migration-version-in-rails-6 Update migration version to 6.0 in the getting started doc [ci skip]
| * | | | | | [ci skip] Updated migration version to 6.0 in the getting started docsAbhay Nikam2019-02-221-2/+2
| | | | | | |
* | | | | | | update callbacks skipping methods in guide [ci skip]Shivam Jain2019-02-231-3/+2
|/ / / / / /
* | | | | | [ci skip] Updated the documentation for bulk delete in activerecordAbhay Nikam2019-02-201-2/+2
| | | | | |
* | | | | | Replaced usage of where.delete/destroy_all with delete/destroy_byAbhay Nikam2019-02-201-1/+1
| | | | | |
* | | | | | Revert "Merge pull request #35324 from sharang-d/patch-2"Ryuta Kamizono2019-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6b69ae5149f03c2f81a795c085bce56ec18535ae, reversing changes made to 84bd9adafde36d0192849649b86ffcd4e59e5e11. Reason: We already use "happen" a lots for callbacks and validations. https://github.com/rails/rails/pull/35324#issuecomment-465096483 [ci skip]
* | | | | | Update active_record_callbacks.md [ci skip]Sharang Dashputre2019-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change 'happen' to a more technical term
* | | | | | Delete documentation inconsistency 'finally' for AR callbacks [ci skip] ↵Shodai Suzuki2019-02-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | (#35303)
* | | | | | Add combining callback conditions [skip ci] (#35313)Shodai Suzuki2019-02-191-0/+14
| | | | | |
* | | | | | Reword RDBMS note in ActiveRecord basicsGannon McGibbon2019-02-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | Merge pull request #35034 from sponomarev/chore/ac-docs-worker-poolEileen M. Uchitelle2019-02-122-5/+18
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add Worker Pool section to Action Cable configuration docs
| * | | | | | Add Worker Pool section to Action Cable configuration docsSergey Ponomarev2019-02-012-5/+18
| | | | | | |
* | | | | | | Revert "Merge pull request #35216 from CHTJonas/patch-1"Ryuta Kamizono2019-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b46601b56d94a02d944ed9bd9494aeea9cba98c8, reversing changes made to 4e6737f18ab8f0d0e9fbe6f73a92e5d29f1c68f1.
* | | | | | | Merge pull request #35216 from CHTJonas/patch-1Eileen M. Uchitelle2019-02-111-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Correct JavaScript guide example