提交 8ef45853 编写于 作者: R Rafael França

Merge pull request #24791 from maclover7/jm-rm-ar-rails-mention

Replace `Rails.version.to_f` with Active Record
......@@ -528,7 +528,7 @@ def self.[](version)
end
def self.current_version
Rails.version.to_f
ActiveRecord::VERSION::STRING.to_f
end
MigrationFilenameRegexp = /\A([0-9]+)_([_a-z0-9]*)\.?([_a-z0-9]*)?\.rb\z/ # :nodoc:
......
......@@ -69,6 +69,10 @@ def setup
ActiveRecord::Migration.verbose = @verbose_was
end
def test_migration_version_matches_component_version
assert_equal ActiveRecord::VERSION::STRING.to_f, ActiveRecord::Migration.current_version
end
def test_migrator_versions
migrations_path = MIGRATIONS_ROOT + "/valid"
old_path = ActiveRecord::Migrator.migrations_paths
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册