diff --git a/lib/generators/shortener/shortener_generator.rb b/lib/generators/shortener/shortener_generator.rb index bab8377..1de9f5a 100644 --- a/lib/generators/shortener/shortener_generator.rb +++ b/lib/generators/shortener/shortener_generator.rb @@ -9,7 +9,7 @@ def self.source_root end def self.next_migration_number(dirname) - if ActiveRecord.timestamped_migrations + if ActiveRecord.respond_to?(:timestamped_migrations) ? ActiveRecord.timestamped_migrations : ActiveRecord::Base.timestamped_migrations Time.new.utc.strftime("%Y%m%d%H%M%S") else "%.3d" % (current_migration_number(dirname) + 1)