[#4184] Load the YAML inside of #migrate.
This commit is contained in:
@@ -33,9 +33,10 @@ module RedmineContracts
|
||||
def self.migrate_contracts
|
||||
::Engines.plugins['redmine_contracts'].migrate
|
||||
end
|
||||
|
||||
|
||||
# * old_data - YAML string of deliverables to migrate
|
||||
def self.migrate(old_data)
|
||||
@@data = old_data
|
||||
@@data = YAML.load(old_data)
|
||||
|
||||
ActiveRecord::Base.transaction do
|
||||
@@data.each do |old_deliverable|
|
||||
|
||||
@@ -6,7 +6,7 @@ class BudgetPluginMigrationTest < ActionController::IntegrationTest
|
||||
end
|
||||
|
||||
def load_test_fixture
|
||||
YAML.load(File.read(File.expand_path(File.dirname(__FILE__)) + "/../fixtures/budget_plugin_migration/budget.yml"))
|
||||
File.read(File.expand_path(File.dirname(__FILE__)) + "/../fixtures/budget_plugin_migration/budget.yml")
|
||||
end
|
||||
|
||||
context "migrate" do
|
||||
|
||||
Reference in New Issue
Block a user