aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | Merge pull request #33880 from robbertbrak/masterRyuta Kamizono2018-09-281-1/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify transactional behavior of after_commit and after_rollback callbacks [ci skip]
| * | | | | | Clarify transactional behavior of after_commit and after_rollback callbacksRobbert Brak2018-09-141-1/+3
| | | | | | |
* | | | | | | Merge pull request #33833 from duduribeiro/patch-2Gannon McGibbon2018-09-271-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] Do not recommend testing stored object in template
| * | | | | | | [ci skip] Recommend testing information displayed over object storedKadu Ribeiro2018-09-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `assigns` is not placed by default with Rails, we suggested to test if the right information was displayed instead of suggesting to test if the right object was stored in the template.
* | | | | | | | Improve phrasing of one sentence in the contributing guidePascal Lamouric2018-09-241-1/+1
| | | | | | | |
* | | | | | | | Added mandatory region and bucketAsaf Bartov2018-09-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | The 'setup' section was misleadingly leaving out :bucket and :region in the sample, but servers don't start without them.
* | | | | | | | Replace line items with chapters [ci skip]Ian Fleeton2018-09-211-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Line items are a holdover from when orders were used in the examples instead of books.
* | | | | | | | Correct spelling in "Contributing to Ruby on Rails" guide [ci skip]bogdanvlviv2018-09-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ambigity -> ambiguity Related to #33891
* | | | | | | | Merge pull request #33891 from jgorman/remote_namesRafael França2018-09-201-40/+12
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Contributing to Ruby on Rails Guide: standardize git remote names [ci skip].
| * | | | | | | | Standardize git remote names.John Gorman2018-09-151-40/+12
| | |_|_|/ / / / | |/| | | | | |
* | | | | | | | Merge pull request #33929 from yahonda/update_utf8mb4_railsguideRyuta Kamizono2018-09-201-1/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Update MySQL server version and character set in Rails Guide [skip ci]
| * | | | | | | | Update MySQL server version and character set in Rails Guide [skip ci]Yasuo Honda2018-09-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Related to #33853
* | | | | | | | | Merge pull request #33897 from bogdanvlviv/follow-up-33751Rafael França2018-09-181-0/+1
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Follow up #33751
| * | | | | | | | Payload of `enqueue_retry.active_job` includes `:wait`bogdanvlviv2018-09-161-0/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mention about it to the "Active Support Instrumentation" guide Related to https://github.com/rails/rails/pull/33751#discussion_r214745153 Follow up #33751
* | | | | | | | Fix a typo in AR Query Interface [ci skip]Andrew2018-09-181-1/+1
| | | | | | | |
* | | | | | | | Improve readability in form helpers guide [ci skip]tkoyama19882018-09-171-2/+2
|/ / / / / / /
* | | | | | | Configure Active Storage route prefixChris Bisnett2018-09-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Applications can configure the route prefix prepended to the Active Storage routes. By default this maintains the previous prefix `/rails/active_storage` but supports custom prefixes. Before this change the route for serving blobs is fixed to `/rails/active_storage/blobs/:signed_id/*filename`. After this change it's possible to configure the route to something like `/files/blobs/:signed_id/*filename`.
* | | | | | | Add `:redis_cache_store` to `config.cache_store` options [ci skip]yuuji.yaginuma2018-09-141-1/+1
| |/ / / / / |/| | | | |
* | | | | | Clarify docs of `config.filter_parameters` and `#filter_attributes`bogdanvlviv2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add mention that `config.filter_parameters` also filters out sensitive values of database columns when call `#inspect` since #33756.
* | | | | | Update action_mailer_basics.md [ci skip]Sharang Dashputre2018-09-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add backticks to code
* | | | | | use "minitest" consistentlyXavier Noria2018-09-115-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The name of the minitest library is spelled that way: regular font, and lowercase. Lowercase is used even at the beginning of sentences, see http://docs.seattlerb.org/minitest/ I double-checked this with @zenspider too (thanks!).
* | | | | | Merge pull request #33824 from yskkin/suppress_loggingRafael França2018-09-112-13/+15
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Skip delivery notification when perform_deliveries is false.
| * | | | | Add `perform_deliveries` to a payload of `deliver.action_mailer` notification.Yoshiyuki Kinjo2018-09-091-12/+14
| | | | | |
| * | | | | Skip delivery notification when perform_deliveries is false.Yoshiyuki Kinjo2018-09-081-1/+1
| | | | | |
* | | | | | Fix sqlite3 url config in "Configuring Rails Applications" guidebogdanvlviv2018-09-091-3/+3
|/ / / / / | | | | | | | | | | | | | | | | | | | | See `ConnectionUrlResolver#database_from_path` in `activerecord/lib/active_record/connection_adapters/connection_specification.rb`
* | | | | trace autoloads, and document hints for troubleshootingXavier Noria2018-09-071-0/+31
| | | | | | | | | | | | | | | | | | | | Closes #32885.
* | | | | Merge pull request #32405 from yhirano55/use_turbolinks_in_guideRafael França2018-09-061-19/+14
|\ \ \ \ \ | | | | | | | | | | | | Use Turbolinks in Rails guides
| * | | | | Use Turbolinks in Rails guidesYoshiyuki Hirano2018-04-231-19/+14
| | | | | |
* | | | | | [ci skip] Typo in form helpers guideNicolas Maloeuvre2018-08-301-1/+1
| | | | | |
* | | | | | Merge pull request #33751 from steves/add_retry_notifications_to_ajRafael França2018-08-301-0/+24
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add hooks to ActiveJob around retries and discards
| * | | | | | Add hooks to ActiveJob around retries and discardsSteve S2018-08-291-0/+24
| | | | | | |
* | | | | | | Merge pull request #33637 from eileencodes/ar-connection-management-refactoringEileen M. Uchitelle2018-08-301-4/+28
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Refactor Active Record configurations
| * | | | | | | Refactors Active Record connection managementEileen Uchitelle2018-08-301-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the three-tier config makes it easier to define databases for multiple database applications, it quickly became clear to offer full support for multiple databases we need to change the way the connections hash was handled. A three-tier config means that when Rails needed to choose a default configuration (in the case a user doesn't ask for a specific configuration) it wasn't clear to Rails which the default was. I [bandaid fixed this so the rake tasks could work](#32271) but that fix wasn't correct because it actually doubled up the configuration hashes. Instead of attemping to manipulate the hashes @tenderlove and I decided that it made more sense if we converted the hashes to objects so we can easily ask those object questions. In a three tier config like this: ``` development: primary: database: "my_primary_db" animals: database; "my_animals_db" ``` We end up with an object like this: ``` @configurations=[ #<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbded10 @env_name="development",@spec_name="primary", @config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}>, #<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbdea90 @env_name="development",@spec_name="animals", @config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}> ]> ``` The configurations setter takes the database configuration set by your application and turns them into an `ActiveRecord::DatabaseConfigurations` object that has one getter - `@configurations` which is an array of all the database objects. The configurations getter returns this object by default since it acts like a hash in most of the cases we need. For example if you need to access the default `development` database we can simply request it as we did before: ``` ActiveRecord::Base.configurations["development"] ``` This will return primary development database configuration hash: ``` { "database" => "my_primary_db" } ``` Internally all of Active Record has been converted to use the new objects. I've built this to be backwards compatible but allow for accessing the hash if needed for a deprecation period. To get the original hash instead of the object you can either add `to_h` on the configurations call or pass `legacy: true` to `configurations. ``` ActiveRecord::Base.configurations.to_h => { "development => { "database" => "my_primary_db" } } ActiveRecord::Base.configurations(legacy: true) => { "development => { "database" => "my_primary_db" } } ``` The new configurations object allows us to iterate over the Active Record configurations without losing the known environment or specification name for that configuration. You can also select all the configs for an env or env and spec. With this we can always ask any object what environment it belongs to: ``` db_configs = ActiveRecord::Base.configurations.configurations_for("development") => #<ActiveRecord::DatabaseConfigurations:0x00007fd1acbdf800 @configurations=[ #<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbded10 @env_name="development",@spec_name="primary", @config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}>, #<ActiveRecord::DatabaseConfigurations::HashConfig:0x00007fd1acbdea90 @env_name="development",@spec_name="animals", @config={"adapter"=>"sqlite3", "database"=>"db/development.sqlite3"}> ]> db_config.env_name => "development" db_config.spec_name => "primary" db_config.config => { "adapter"=>"sqlite3", "database"=>"db/development.sqlite3" } ``` The configurations object is more flexible than the configurations hash and will allow us to build on top of the connection management in order to add support for primary/replica connections, sharding, and constructing queries for associations that live in multiple databases.
* | | | | | | | Add info about purpose in cookies to "Upgrading Ruby on Rails" guide [ci skip]bogdanvlviv2018-08-301-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Context https://github.com/rails/rails/pull/33605#discussion_r210354278 Related to #32937, #33605
* | | | | | | | Add info about `config.action_dispatch.use_cookies_with_metadata` to ↵bogdanvlviv2018-08-301-0/+3
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "Configuring Rails Applications" guide [ci skip] Related to #32937, #33605.
* | | | | | | Merge pull request #33737 from bogdanvlviv/add-6_0_release_notes-guideRafael França2018-08-293-1/+183
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Add "Ruby on Rails 6.0 Release Notes" guide [ci skip]
| * | | | | | | Add "Ruby on Rails 6.0 Release Notes" guide [ci skip]bogdanvlviv2018-08-293-1/+183
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds a skeleton of "Ruby on Rails 6.0 Release Notes". It isn't a good time to add changelogs' entries to this guide since we can redo/revert some things till the final release 6.0. It would be better to do it close to the release. But we already can add mentions about major features that have been added to 6.0. I added mention about "Parallel Testing".
* | | | | | | | Use the HTTPS protocol for links to Edges Guides [ci skip]tleneveu2018-08-283-4/+4
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | Edges Guides is now available in HTTPS, it would be better to use the HTTPS protocol directly.
* / / / / / / Update "Action View Form Helpers" guide [ci skip]bogdanvlviv2018-08-271-96/+118
|/ / / / / /
* | | | | | Follow up #33523 [ci skip]bogdanvlviv2018-08-271-50/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is the next work after #33523. Also, this commit removes mention about hidden `utf8` input. Since form helpers don't generate this input by default since #32125. Note that I also had created PR #31972 with improvements to "Action View Form Helpers" guide, but I'll rebase it after merging the current PR.
* | | | | | Merge pull request #33681 from minaslater/replace-white-and-blacklistAaron Patterson2018-08-239-40/+41
|\ \ \ \ \ \ | | | | | | | | | | | | | | [ci skip] change all instances of blacklist and whitelist to denylist…
| * | | | | | [ci skip] corrects more grammar awkwardness, replacing denylist with ↵Mina Slater2018-08-229-37/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | restricted list and consistently use permitted
| * | | | | | [ci skip] revert terminology related to syntaxMina Slater2018-08-221-1/+1
| | | | | | |
| * | | | | | [ci skip] fixes a few more grammar issues, changing a to an before the word ↵Mina Slater2018-08-224-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | allowlist
| * | | | | | [ci skip] fixes awkward grammarMina Slater2018-08-226-12/+12
| | | | | | |
| * | | | | | [ci skip] change all instances of blacklist and whitelist to denylist and ↵Mina Slater2018-08-2111-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | allowlist
* | | | | | | Include form_with in form_helpers rails guide (#33523)Nick Schwaderer2018-08-221-53/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Include form_with in form_helpers rails guide * Include form_tag and form_for footnote * Id and class attributes are not wrapped anymore * Include note that all form_with forms are remote:true by default * Underline most common use case of form_with is with arguments * Form_with no longer accepts multiple hashes in form helper calls * Review final sections * Revert extra documentation * Remove unnecessary link
* | | | | | | Merge pull request #33685 from krusty3002/masterRafael França2018-08-221-0/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Added explanation about new_framework_defaults.rb file [ci skip]
| * | | | | | | Fixed file name [ci skip]Claas Zurawski2018-08-221-1/+1
| | | | | | | |
| * | | | | | | Added explanation about new_framework_defaults.rb file [ci skip]Claas Zurawski2018-08-221-0/+7
| | | | | | | |