method

migration_file_name

rails latest stable - Class: Rails::Generators::Testing::Behaviour

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v7.0.0) is shown here.

migration_file_name(relative)
private

No documentation available.

# File railties/lib/rails/generators/testing/behaviour.rb, line 104
          def migration_file_name(relative)
            absolute = File.expand_path(relative, destination_root)
            dirname, file_name = File.dirname(absolute), File.basename(absolute).delete_suffix(".rb")
            Dir.glob("#{dirname}/[0-9]*_*.rb").grep(/\d+_#{file_name}.rb$/).first
          end