Fit issue 240 by using slug to find content-type

export.rb exports targets with
field_attributes['target'] = target_klass._parent.slug
but import imports it with:
target_content_type = site.content_types.where(:name => association.target).first

this fails if one uses capitalized names for Models.
i changed the default.zip to contain a site yaml with capitalized
Model-Names too.
This commit is contained in:
Paul Sponagl 2012-01-09 15:01:51 +01:00
parent a650acd535
commit 27dd3b2001
2 changed files with 2 additions and 2 deletions

View File

@ -189,7 +189,7 @@ module Locomotive
content = content._parent.reload.contents.find(content._id) # target should be updated
associations.each do |association|
target_content_type = site.content_types.where(:name => association.target).first
target_content_type = site.content_types.where(:slug => association.target).first
next if target_content_type.nil?
@ -240,4 +240,4 @@ module Locomotive
end
end
end
end

Binary file not shown.