diff options
Diffstat (limited to 'guides/source/configuring.md')
-rw-r--r-- | guides/source/configuring.md | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md index d7fa8813b2..f6b7b3b5a7 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -383,18 +383,18 @@ indicates whether boolean values are stored in sqlite3 databases as 1 and 0 or set to false is deprecated. SQLite databases have used 't' and 'f' to serialize boolean values and must have old data converted to 1 and 0 (its native boolean serialization) before setting this flag to true. Conversion can be accomplished -by setting up a rake task which runs +by setting up a Rake task which runs ```ruby ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 1) - ExampleModel.where("boolean_column = 't'").update_all(boolean_column: 0) + ExampleModel.where("boolean_column = 'f'").update_all(boolean_column: 0) ``` for all models and all boolean columns, after which the flag must be set to true by adding the following to your application.rb file: ```ruby - ActiveRecord::ConnectionAdapters::SQLite3Adapter.represent_boolean_as_integer = true + Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true ``` The schema dumper adds one additional configuration option: @@ -423,7 +423,7 @@ The schema dumper adds one additional configuration option: * `config.action_controller.per_form_csrf_tokens` configures whether CSRF tokens are only valid for the method/action they were generated for. -* `config.action_controller.default_protect_from_forgery` determines whether forgery protection is added on `ActionController:Base`. This is false by default, but enabled when loading defaults for Rails 5.2. +* `config.action_controller.default_protect_from_forgery` determines whether forgery protection is added on `ActionController:Base`. This is false by default, but enabled when loading defaults for Rails 5.2. * `config.action_controller.relative_url_root` can be used to tell Rails that you are [deploying to a subdirectory](configuring.html#deploy-to-a-subdirectory-relative-url-root). The default is `ENV['RAILS_RELATIVE_URL_ROOT']`. |