Skip to content

Commit

Permalink
Merge pull request #1 from jonathandean/fix-generator-for-activerecor…
Browse files Browse the repository at this point in the history
…d-7_1_2

Fix NoMethodError for ActiveRecord 7.1.2 in ShortenerGenerator
  • Loading branch information
jonathandean authored Jan 22, 2024
2 parents d23f458 + 0989cbf commit 2ad9f20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/generators/shortener/shortener_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ def self.source_root
end

def self.next_migration_number(dirname)
if ActiveRecord::Base.timestamped_migrations
if ActiveRecord.timestamped_migrations
Time.new.utc.strftime("%Y%m%d%H%M%S")
else
"%.3d" % (current_migration_number(dirname) + 1)
Expand Down

0 comments on commit 2ad9f20

Please sign in to comment.