mirror of
https://github.com/DatabaseCleaner/database_cleaner
synced 2023-03-27 23:22:03 -04:00
Merge pull request #344 from HaiTo/fix_indent
fix indent in active_record/truncation.rb
This commit is contained in:
commit
bb608dd3ac
1 changed files with 8 additions and 8 deletions
|
@ -190,9 +190,9 @@ module DatabaseCleaner
|
|||
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 @@ module DatabaseCleaner::ActiveRecord
|
|||
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
|
||||
|
|
Loading…
Reference in a new issue