aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/configuring.md
Commit message (Collapse)AuthorAgeFilesLines
* url -> URL where apt except inside actionpack/Sharang Dashputre2019-04-011-1/+1
|
* Rename `i18n_full_message` config option to `i18n_customize_full_message`Prathamesh Sonpatki2019-03-291-1/+1
| | | | | | - I feel `i18n_customize_full_messages` explains the meaning of the config better. - Followup of https://github.com/rails/rails/pull/32956
* Add default value `ActiveSupport::Deprecation.silenced` [ci skip]soartec-lab2019-03-251-1/+1
|
* Cleanup guide for configuring config.disable_sandbox and related changelog ↵Vipul A M2019-03-251-1/+1
| | | | [ci skip] (#35733)
* Merge pull request #35723 from sikachu/disable-sandbox-flagGuillermo Iguaran2019-03-241-0/+2
|\ | | | | Add config.disable_sandbox option to Rails console
| * Add config.disable_sandbox option to Rails consolePrem Sichanugrist2019-03-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | A long-running `rails console --sandbox` could cause a database server to become out-of-memory as it's holding on to changes that happen on the database. Given that it's common for Ruby on Rails application with huge traffic to have separate write database and read database, we should allow the developers to disable this sandbox option to prevent someone from accidentally causing the Denial-of-Service on their server.
* | Add default `config.action_view.raise_on_missing_translations` [ci skip]soartec-lab2019-03-241-1/+1
|/
* 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
|
* 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
* | Update links and code examples in the guides to use HTTPS where the host ↵Nathaniel Suchy2019-03-061-2/+2
| | | | | | | | supports it.
* | Merge pull request #35034 from sponomarev/chore/ac-docs-worker-poolEileen M. Uchitelle2019-02-121-0/+3
|\ \ | | | | | | Add Worker Pool section to Action Cable configuration docs
| * | Add Worker Pool section to Action Cable configuration docsSergey Ponomarev2019-02-011-0/+3
| | |
* | | Remove finalizer and configurationAaron Patterson2019-02-061-7/+0
| | |
* | | Fix a tiny typo [ci skip]Robin Dupret2019-01-261-1/+1
| | | | | | | | | | | | Follow-up to #35055.
* | | document the possibility of app initializers running before gem initilizersbughit2019-01-251-0/+2
|/ / | | | | and suggest a workaround
* / Change `SQLite3Adapter` to always represent boolean values as integersRafael Mendonça França2019-01-171-23/+0
|/
* Add info about `config.action_mailer.delivery_job` to the guide [ci skip]bogdanvlviv2019-01-111-0/+3
| | | | | | | | Also, add mention to `new_framework_defaults_6_0.rb` that `ActionMailer::Parameterized::DeliveryJob` is default for parameterized mail and will be removed. Related to #34692
* Send Active Storage jobs to dedicated queues by defaultGeorge Claghorn2019-01-041-0/+2
| | | Match Action Mailbox, which sets a default queue for each of its two jobs.
* Update the "Configuring Rails Applications" guide [ci skip]bogdanvlviv2019-01-041-2/+32
| | | | Add section "Results of `load_defaults`" to the guide.
* Permit sending Active Storage purge and analysis jobs to separate queuesGeorge Claghorn2019-01-011-2/+9
|
* Document Action Mailbox configuration options [ci skip]George Claghorn2019-01-011-0/+23
|
* Mention tiff support in ActiveStorage guidesGannon McGibbon2018-12-311-1/+1
| | | | [ci skip]
* Single nest config in configuration guidesSam Bostock2018-12-181-1/+1
| | | | | | | Double nesting of configuration is not supported (without using an intermediate object), even though the docs suggest it is. [ci-skip]
* Improve deprecation message for enqueue returning falseRafael Mendonça França2018-12-051-0/+2
| | | | | | And make sure new applications in Rails 6.0 has this config enabled. Also, improve test coverage and add a CHANGELOG entry.
* Merge pull request #34455 from ↵Rafael França2018-11-231-1/+1
|\ | | | | | | | | minimalweb/progressive_jpeg_inclusion_as_variable_content_type Add progressive JPG MIME-type to default variable content types
| * Add progressive JPG to default variable content typesMaurice Kühlborn2018-11-211-1/+1
| |
* | Change queueing to queuing in docs and comments [skip ci]jacobherrington2018-11-181-1/+1
|/ | | | | | | | | My spellchecker flagged this as an incorrect spelling, upon further research it appears to be a point of contention in English. Either way might work. After further examination queuing is much more common in the Rails codebase so making this change will serve to standardize the spelling.
* Add support for UNLOGGED Postgresql tablesJacob Evelyn2018-11-131-0/+8
| | | | | | | | | | | This commit adds support for the `ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables` setting, which turns `CREATE TABLE` SQL statements into `CREATE UNLOGGED TABLE` statements. This can improve PostgreSQL performance but at the cost of data durability, and thus it is highly recommended that you *DO NOT* enable this in a production environment.
* Restore `encoding: utf8mb4` in database.ymlYasuo Honda2018-10-301-0/+1
| | | | | | | rails/rails#33853 and rails/rails#33929 removed `encoding: utf8mb4` from database.yml since at that time MySQL 5.1 is supported with the master branch. Since MySQL 5.1 has been dropped, we can restore `encoding: utf8mb4` in database.yml
* Remove `javascripts` and `javascript_engine` options for generatorsbogdanvlviv2018-10-221-2/+0
| | | | It is unused since #33079
* Fix the LoggerSilence to work as described:Edouard CHIN2018-10-021-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Following the Rails guide which state that a logger needs to include the `ActiveSupport::LoggerSilence` as well as `ActiveSupport::LoggerThreadSafe` modules isn't enough and won't work. Here is a test cases with 3 tests that all fails https://gist.github.com/Edouard-chin/4a72930c2b1eafbbd72a80c66f102010 The problems are the following: 1) The logger needs to call `after_initialize` in order to setup some instance variables. 2) The silence doesn't actually work because the bare ruby Logger `add` method checks for the instance variable `@logger`. We need to override the `add` (like we used to in the ActiveSupport::Logger class). 3) Calling `debug?` `info?` etc... doesn't work as the bare ruby methods will check for the instance variable. Again we need to override this methods (like we used to in the ActiveSupport::Logger class) The LoggerSilence won't work without LoggerThreadSafe, but the later is not public API, the user shouldn't have to include it so I modified to include it automatically. Same for the `after_initialize` method. I find unuintitive to have to call it directly. I modified to instance the variables when the module get included.
* Deprecate the `LoggerSilence` constant:Edouard CHIN2018-10-021-2/+2
| | | | | | | | - I found this weird that the LoggerSilence wasn't using the `ActiveSupport` namespace (AFAIK all other classes have it). This PR deprecate the use of `LoggerSilence` for `ActiveSupport::LoggerSilence` instead.
* Update MySQL server version and character set in Rails Guide [skip ci]Yasuo Honda2018-09-201-1/+2
| | | | Related to #33853
* 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.
* use "minitest" consistentlyXavier Noria2018-09-111-1/+1
| | | | | | | | | 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!).
* 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`
* 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 `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 #33681 from minaslater/replace-white-and-blacklistAaron Patterson2018-08-231-2/+2
|\ | | | | [ci skip] change all instances of blacklist and whitelist to denylist…
| * [ci skip] corrects more grammar awkwardness, replacing denylist with ↵Mina Slater2018-08-221-2/+2
| | | | | | | | restricted list and consistently use permitted
| * [ci skip] fixes a few more grammar issues, changing a to an before the word ↵Mina Slater2018-08-221-1/+1
| | | | | | | | allowlist
| * [ci skip] fixes awkward grammarMina Slater2018-08-221-2/+2
| |
| * [ci skip] change all instances of blacklist and whitelist to denylist and ↵Mina Slater2018-08-211-2/+2
| | | | | | | | allowlist
* | Add database configuration to disable advisory locks.Guo Xiang Tan2018-08-221-1/+10
|/ | | | https://github.com/rails/rails/issues/31190
* Merge pull request #33229 from ↵Matthew Draper2018-07-251-4/+4
|\ | | | | | | | | albertoalmagro/albertoalmagro/prefer-rails-command-over-bin-rails Prefer rails command over bin/rails