Skip to content

Commit 4c30ca5

Browse files
Merge pull request rails#49605 from Earlopain/unlogged-table-docs
Fix code example for create_unlogged_tables
2 parents bbf4fc9 + 430d962 commit 4c30ca5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,11 @@ def dbconsole(config, options = {})
108108
# but significantly increases the risk of data loss if the database
109109
# crashes. As a result, this should not be used in production
110110
# environments. If you would like all created tables to be unlogged in
111-
# the test environment you can add the following line to your test.rb
112-
# file:
111+
# the test environment you can add the following to your test.rb file:
113112
#
114-
# ActiveRecord::ConnectionAdapters::PostgreSQLAdapter.create_unlogged_tables = true
113+
# ActiveSupport.on_load(:active_record_postgresqladapter) do
114+
# self.create_unlogged_tables = true
115+
# end
115116
class_attribute :create_unlogged_tables, default: false
116117

117118
##

0 commit comments

Comments
 (0)