From d08b2df8c7090744b8db3dc12e1da72d19faa083 Mon Sep 17 00:00:00 2001 From: HaiTo Date: Wed, 11 Mar 2015 11:33:12 +0900 Subject: [PATCH] fix indent --- lib/database_cleaner/active_record/truncation.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/database_cleaner/active_record/truncation.rb b/lib/database_cleaner/active_record/truncation.rb index 9a328f70..5ff75fb3 100755 --- a/lib/database_cleaner/active_record/truncation.rb +++ b/lib/database_cleaner/active_record/truncation.rb @@ -190,9 +190,9 @@ def tables_with_schema rows = select_rows <<-_SQL SELECT schemaname || '.' || tablename FROM pg_tables - WHERE - tablename !~ '_prt_' AND - tablename <> '#{::ActiveRecord::Migrator.schema_migrations_table_name}' AND + WHERE + tablename !~ '_prt_' AND + tablename <> '#{::ActiveRecord::Migrator.schema_migrations_table_name}' AND schemaname = ANY (current_schemas(false)) _SQL rows.collect { |result| result.first } @@ -247,12 +247,12 @@ def tables_to_truncate(connection) tables_in_db = cache_tables? ? connection.database_cleaner_table_cache : connection.tables to_reject = (@tables_to_exclude + connection.database_cleaner_view_cache) (@only || tables_in_db).reject do |table| - if ( m = table.match(/([^.]+)$/) ) - to_reject.include?(m[1]) - else - false - end + if ( m = table.match(/([^.]+)$/) ) + to_reject.include?(m[1]) + else + false end + end end # overwritten