From 90bb874ea15a16d3fa363a6f5b2fe7302c913f7b Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Thu, 13 Jul 2017 07:36:40 +0900 Subject: Fix boolean column migration script --- guides/source/configuring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/configuring.md') diff --git a/guides/source/configuring.md b/guides/source/configuring.md index d7fa8813b2..bc8df5a797 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -387,7 +387,7 @@ 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 -- cgit v1.2.3 From a18cf23a9cbcbeed61e8049442640c7153e0a8fb Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Fri, 14 Jul 2017 08:01:49 +0900 Subject: Set `represent_boolean_as_integer` via `configuration` --- guides/source/configuring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/source/configuring.md') diff --git a/guides/source/configuring.md b/guides/source/configuring.md index bc8df5a797..61c4bd1e61 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -394,7 +394,7 @@ by setting up a rake task which runs 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: -- cgit v1.2.3