method
migration_file_name
v5.1.7 -
Show latest stable
- Class:
Rails::Generators::Testing::Behaviour
migration_file_name(relative)private
No documentation available.
# File railties/lib/rails/generators/testing/behaviour.rb, line 101
def migration_file_name(relative)
absolute = File.expand_path(relative, destination_root)
dirname, file_name = File.dirname(absolute), File.basename(absolute).sub(/\.rb$/, "")
Dir.glob("#{dirname}/[0-9]*_*.rb").grep(/\d+_#{file_name}.rb$/).first
end