lib/spectifly/xsd/association.rb in spectifly-0.0.7 vs lib/spectifly/xsd/association.rb in spectifly-0.0.8

- old
+ new

@@ -5,10 +5,10 @@ Spectifly::Support.camelize(@field_name).gsub(/\W/, '') end def to_xsd(builder = nil) builder ||= ::Builder::XmlMarkup.new(:indent => 2) - if relationship == 'belongs_to' + if relationship =~ /^belongs_to(_many)?/ attributes['name'] = "#{name}Id" attributes['type'] = "xs:string" else attributes['name'] = name attributes['type'] = "#{Spectifly::Support.lower_camelize(type)}Type"