diff options
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/6_0_release_notes.md | 24 | ||||
-rw-r--r-- | guides/source/getting_started.md | 8 | ||||
-rw-r--r-- | guides/source/i18n.md | 21 |
3 files changed, 27 insertions, 26 deletions
diff --git a/guides/source/6_0_release_notes.md b/guides/source/6_0_release_notes.md index b35d16134f..17d1132e73 100644 --- a/guides/source/6_0_release_notes.md +++ b/guides/source/6_0_release_notes.md @@ -692,6 +692,30 @@ Please refer to the [Changelog][active-model] for detailed changes. * Add `ActiveModel::Errors#of_kind?` to check presence of a specific error. ([Pull Request](https://github.com/rails/rails/pull/34866)) +* Fix `ActiveModel::Serializers::JSON#as_json` method for timestamps. + ([Pull Request](https://github.com/rails/rails/pull/31503)) + +* Fix numericality validator to still use value before type cast except Active Record. + ([Pull Request](https://github.com/rails/rails/pull/33654)) + +* Fix numericality equality validation of `BigDecimal` and `Float` + by casting to `BigDecimal` on both ends of the validation. + ([Pull Request](https://github.com/rails/rails/pull/32852)) + +* Fix year value when casting a multiparameter time hash. + ([Pull Request](https://github.com/rails/rails/pull/34990)) + +* Type cast falsy boolean symbols on boolean attribute as false. + ([Pull Request](https://github.com/rails/rails/pull/35794)) + +* Return correct date while converting parameters in `value_from_multiparameter_assignment` + for `ActiveModel::Type::Date`. + ([Pull Request](https://github.com/rails/rails/pull/29651)) + +* Fall back to parent locale before falling back to the `:errors` namespace while fetching + error translations. + ([Pull Request](https://github.com/rails/rails/pull/35424)) + Active Support -------------- diff --git a/guides/source/getting_started.md b/guides/source/getting_started.md index e486c53fe3..1f6744caba 100644 --- a/guides/source/getting_started.md +++ b/guides/source/getting_started.md @@ -126,7 +126,7 @@ run the following: $ rails --version ``` -If it says something like "Rails 5.2.1", you are ready to continue. +If it says something like "Rails 6.0.0", you are ready to continue. ### Creating the Blog Application @@ -205,12 +205,10 @@ $ rails server TIP: If you are using Windows, you have to pass the scripts under the `bin` folder directly to the Ruby interpreter e.g. `ruby bin\rails server`. -TIP: Compiling CoffeeScript and JavaScript asset compression requires you +TIP: Compiling JavaScript asset compression requires you have a JavaScript runtime available on your system, in the absence of a runtime you will see an `execjs` error during asset compilation. Usually macOS and Windows come with a JavaScript runtime installed. -Rails adds the `mini_racer` gem to the generated `Gemfile` in a -commented line for new apps and you can uncomment if you need it. `therubyrhino` is the recommended runtime for JRuby users and is added by default to the `Gemfile` in apps generated under JRuby. You can investigate all the supported runtimes at [ExecJS](https://github.com/rails/execjs#readme). @@ -1560,7 +1558,7 @@ class CreateComments < ActiveRecord::Migration[6.0] create_table :comments do |t| t.string :commenter t.text :body - t.references :article, foreign_key: true + t.references :article, null: false, foreign_key: true t.timestamps end diff --git a/guides/source/i18n.md b/guides/source/i18n.md index d6fccadb28..5d91a6df33 100644 --- a/guides/source/i18n.md +++ b/guides/source/i18n.md @@ -992,27 +992,6 @@ So, for example, instead of the default error message `"cannot be blank"` you co | numericality | :odd | :odd | - | | numericality | :even | :even | - | -#### Translations for the Active Record `error_messages_for` Helper - -If you are using the Active Record `error_messages_for` helper, you will want to add -translations for it. - -Rails ships with the following translations: - -```yaml -en: - activerecord: - errors: - template: - header: - one: "1 error prohibited this %{model} from being saved" - other: "%{count} errors prohibited this %{model} from being saved" - body: "There were problems with the following fields:" -``` - -NOTE: In order to use this helper, you need to install [DynamicForm](https://github.com/joelmoss/dynamic_form) -gem by adding this line to your `Gemfile`: `gem 'dynamic_form'`. - ### Translations for Action Mailer E-Mail Subjects If you don't pass a subject to the `mail` method, Action Mailer will try to find |