Skip to content

Commit 2caf790

Browse files
committed
fixup! [Fix rubocop#1410] Make registered cops aware of AllCops: MigratedSchemaVersion
1 parent 11321b8 commit 2caf790

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/rubocop/rails/migration_file_skippable.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def self.apply_to_cops!
3838
def already_migrated_file?
3939
return false unless migrated_schema_version
4040

41-
match_data = File.basename(processed_source.file_path).match(/(?<timestamp>\d{14})/)
41+
match_data = File.basename(processed_source.file_path).match(%r|migrate/*/*(?<timestamp>\d{14})|)
4242
schema_version = match_data['timestamp'] if match_data
4343

4444
return false unless schema_version

0 commit comments

Comments
 (0)