Skip to content

Commit 209a860

Browse files
committed
Use early return
1 parent 621c3bf commit 209a860

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/support/generator_setup.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ def file(relative_path)
1717

1818
def migration_content(file_path)
1919
migration_path = find_migration_files(file_path).first
20-
migration_path ? Pathname.new(migration_path).read : nil
20+
return if migration_path.nil?
21+
22+
Pathname.new(migration_path).read
2123
end
2224

2325
def find_migration_files(file_path)

0 commit comments

Comments
 (0)