aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Document `deep_interpolation` parameter for bulk lookupsOliver Günther2018-10-251-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bulk lookups are sort of an edge case, I have not heard of them until a colleague of mine decided to dynamically iterate over a growing set of translations and receiving them in bulk as a hash with `I18n.t 'welcome'` as in the example above. When passing an interpolation to these bulk lookups, they will only be performed when also passing `deep_interpolation: true`. **Without passing `deep_interpolation` flag:** ```ruby I18n.t 'welcome', app_name: 'book store' # => {:title=>"Welcome!", :content=>"Welcome to the %{app_name}"} **With passing `deep_interpolation`:** I18n.t 'welcome', deep_interpolation: true, app_name: 'book store' # => {:title=>"Welcome!", :content=>"Welcome to the book store"} ``` I found this digging in the I18n lookup backend, the flag is listed on [I18n's Rubydoc](https://www.rubydoc.info/github/svenfuchs/i18n/master/I18n) but not otherwise listed. Since bulk lookups are mentioned here, I suggest to add a note with this flag along with it.
* | | | | | | | Merge pull request #34080 from baerjam/add-email-observer-to-guidesGannon McGibbon2018-10-231-5/+24
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add observing emails to action mailer guide [ci skip]
| * | | | | | | | Add observing emails to action mailer guide [ci skip]James Baer2018-10-041-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds information on using email observer classes with Action Mailer. Intercepting Emails section is changed to "Intercepting and Observing Emails", with a sub-section on each topic. Also includes slight reworking of the Intercepting Emails summary to flow with the new structure.
* | | | | | | | | Fully remove duplicated upgrade information [ci skip]Alberto Almagro2018-10-231-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On #34261 we removed the whole upgrade section. This warning is also included in the Upgrade guides [here](https://github.com/rails/rails/blame/master/guides/source/upgrading_ruby_on_rails.md#L1390) and should also be removed.
* | | | | | | | | Fix typo of duplicated `the` [ci skip]ohbarye2018-10-241-1/+1
| | | | | | | | |
* | | | | | | | | Fix PullRequest link to datetime_field changes on Rails 5.1 Release Notestzmfreedom2018-10-231-1/+1
| | | | | | | | |
* | | | | | | | | Merge pull request #34284 from ↵Rafael França2018-10-231-5/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bogdanvlviv/remove-mention-about-javascript-from-generators-guide Remove mentions about `javascripts` option from the guide about generators [ci skip]
| * | | | | | | | | Remove mentions about `javascripts` option from the guide about generators ↵bogdanvlviv2018-10-221-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] This option is unused since #33079. Follow up #34277
* | | | | | | | | | Merge pull request #34261 from ↵Ryuta Kamizono2018-10-231-57/+0
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | matildasmeds/guides_remove_upgrade_section_from_asset_pipeline_guide Remove "Upgrading from Old Versions" from Asset Pipeline Guide [skip ci]
| * | | | | | | | | Remove "Upgrading Old Versions" from Asset Pipeline Guide [skip ci]Matilda Smeds2018-10-191-57/+0
| | |_|_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * How to upgrade Rails 2.x/3.2 not relevant for this Guide * All configuration changes are already included in Upgrading Ruby on Rails Guide
* | | | | | | | | [ci skip] Fix #33914Raghu Kamat2018-10-221-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit removes the dependent: :destroy option from the belong_to example since there is a warning associated with the usage of dependent: :destroy along with belongs_to. Based on the feedback on the issue #33914, I replaced dependent: :destroy with touch: :books_updated_at which will make the example consistent with the example that already exists on that page. * Also Removing the touch option from the belong_to scopes example as the option doesnt have any relation to association scope.
* | | | | | | | | Merge pull request #34241 from gmcgibbon/clarify_i18n_load_paths_gotchaRafael França2018-10-221-1/+3
|\ \ \ \ \ \ \ \ \ | |_|/ / / / / / / |/| | | | | | | | Clarify i18n load paths gotcha
| * | | | | | | | [ci skip] Clarify load_paths behaviourGannon McGibbon2018-10-221-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clarify `I18n.load_paths` vs `Rails.application.config.i18n.load_paths` behaviour. [Gannon McGibbon + Alberto Almagro Sotelo]
| * | | | | | | | [ci skip] Remove explicit to_s for consistency with other exampleTrevor Wistaff2018-10-161-1/+1
| | | | | | | | |
* | | | | | | | | Remove `javascripts` and `javascript_engine` options for generatorsbogdanvlviv2018-10-221-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is unused since #33079
* | | | | | | | | Shorten unnecessarily long names for GuidesOlivier Lacan2018-10-191-16/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The names are only used in the Guides Index overlay and several of them are longer than they need to be. For example “Ruby on Rails” is mentioned over and over again in the Release Notes section although these are obviously all Rails versions we’re listing. There’s a Maintenance Policy category with a Maintenance Policy article which is redundant. Policies makes much more sense as a category. Similarly, Contributing to Ruby on Rails is both a category and an article. “Contributions” is a better category title. “Ruby on Rails Guides Guidelines” is a gigantic mouthful. We are *in* the Rails Guides, we don’t need to specify what guides we’re talking about here. As a final added advantage, all of these shortenings make the index much easier to parse in order to find an article. [ci skip]
* | | | | | | | | Use CSS flexbox for Guides index menuOlivier Lacan2018-10-191-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This notably allows us to tile each category without pushing the page down vertically as much as we previously did on any viewport wider than mobile sizes. It also means we can fit more guides which will become useful in the future since we have several new guides in the work. Finally the new layout allows three clearly distinct columns to emerge: - Start Here and Rails basics: Models, Views, Controllers, Other Components - Digging Deeper, Extending Rails, Contributing, Maintenance - Release Notes Having Release Notes shoot back up to the top of the third column is great because that makes finding the latest released version and its associated release notes much easier without having to scroll down a bunch. [ci skip]
* | | | | | | | | Merge pull request #34257 from olivierlacan/verbose-query-logs-guidesRichard Schneeman2018-10-191-6/+43
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add guides section on verbose query logs to Debugging
| * | | | | | | | | Add guides section on verbose query logs to DebuggingOlivier Lacan2018-10-191-6/+43
| | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since this is a useful tool in debugging it made sense to document its existence and usage, especially in the console where it's disabled by default. [ci skip]
* / | | | | | | | Fix typo in testing guideanthonygharvey2018-10-171-1/+1
|/ / / / / / / /
* | | | | | | | Remove and flip `index: true` for `references` in the doc [ci skip]Ryuta Kamizono2018-10-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow up #32146.
* | | | | | | | Merge pull request #32146 from abhikanojia/association_guide_fixRyuta Kamizono2018-10-171-10/+10
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove index:true option from belongs to as defaults to true. [ci skip]
| * | | | | | | | Remove index:true option from belongs to as defaults to true.abhishekkanojia2018-03-011-10/+10
| | | | | | | | |
* | | | | | | | | Update guide for the counter variable when rendering with the `as:` optionLucas Oliveira2018-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | Fix mapping of contentAdam Demirel2018-10-171-1/+1
| |/ / / / / / / |/| | | | | | |
* | | | | | | | Update snippet to rails 5 syntaxAdam Demirel2018-10-151-1/+1
| |/ / / / / / |/| | | | | |
* | | | | | | Merge pull request #34075 from hakusaro/guides-reference-leasesGannon McGibbon2018-10-091-6/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Change contributing guide to suggest using safer force push
| * | | | | | | Change contributing guide to use safer force pushLucas Nicodemus2018-10-041-6/+7
| | |/ / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the contributing guide in rails to suggest using git with force-with-lease over typical force pushing. In practice, most rails contributors won't ever encounter a situation where updating their local fork could result in lost changes as a result of a force push. That being said, git is a complex tool and arcane flags like force-with-lease are indeed safer, and by promoting it in rails, there's a chance more people will discover it and use it in other contexts outside of rails. In just the same way that herd immunity works by most people being vaccinated, proliferating knowledge of force-with-lease should help nudge people towards using safer git commands in general. [ci skip]
* | | | | | | Merge pull request #34105 from zvkemp/correct-asn-docsGannon McGibbon2018-10-091-2/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | clarify role of unique_id in ActiveSupport::Notifications [ci skip]
| * | | | | | | clarify role of unique_id in ActiveSupport::Notificationszvkemp2018-10-051-2/+3
| |/ / / / / /
* | | | | | | fix broken link in Action Cable guides and readme [ci skip]Greg Molnar2018-10-081-1/+1
| | | | | | |
* | | | | | | Merge pull request #34114 from Madogiwa0124/update_getting_start_rails_versionEileen M. Uchitelle2018-10-071-1/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | getting started page rails version update to 5.2.1
| * | | | | | | getting started page rails version update to 5.2.1Madogiwa2018-10-071-1/+1
| | | | | | | |
* | | | | | | | Merge pull request #34077 from cllns/clarify-activesupport-instructionYuji Yaginuma2018-10-061-0/+8
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | ActiveStorage guide: Add instruction for test environment
| * | | | | | | | Add instruction for test environmentSean Collins2018-10-051-0/+8
| | |/ / / / / / | |/| | | | | |
* / | | | | | | Add documentation to run tests with specific seed [ci skip]Alberto Almagro2018-10-051-0/+20
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit documents how to run all tests or a single test file with a specific randomization seed.
* | | | | | | Merge pull request #34055 from Edouard-chin/ec-logger-fixRafael França2018-10-031-2/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix the LoggerSilence to work as described:
| * | | | | | | 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.
* / | | | | | Fix the docs for Module#parents and related methods in guides [ci skip]Prathamesh Sonpatki2018-10-031-16/+16
|/ / / / / / | | | | | | | | | | | | | | | | | | - Followup of https://github.com/rails/rails/pull/34051
* | | | | | Merge pull request #34053 from prathamesh-sonpatki/update-js-docsRafael França2018-10-025-17/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | Update js docs after the webpacker changes
| * | | | | | Turbolinks is enabled by default in new apps [ci skip]Prathamesh Sonpatki2018-10-031-4/+0
| | | | | | |
| * | | | | | Update the docs now that webpacker is default [ci skip]Prathamesh Sonpatki2018-10-034-13/+5
| | |_|_|_|/ | |/| | | |
* / | | | | 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.
* | | | | Fix spellings for 'unmarshall(ing/ed)' & 'marshall(ing/ed)'Sharang Dashputre2018-10-024-4/+4
| | | | |
* | | | | Updates expires_in docsGraham Turner2018-09-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously the documentation for expires_in suggested that the option was available for all cache stores. This clarifies that the behavior can be supported, but is not always supported.
* | | | | Merge pull request #33348 from ruralocity/update-validation-contexts-guideRyuta Kamizono2018-09-281-9/+27
|\ \ \ \ \ | | | | | | | | | | | | Update guide for validation custom contexts [ci skip]
| * | | | | Update guide for validation custom contexts [ci skip]Aaron Sumner2018-07-111-9/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Active Record validations guide's section on custom contexts appears to be incomplete. the code sample shows a context being added to validations, but not being used. Add to the sample code for this section by showing validations being run with and without the custom context. Add a second sample code block showing that validations with no context are also run, when a context is used.
* | | | | | 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