Permalink
Browse files

Making attrib_hash['values']['value'] always an array, fixes #30

  • Loading branch information...
1 parent d6bf17f commit 7ff57bcb33649d62a4341f480c22f2c05acafb6a @adamhjk adamhjk committed Jan 31, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/attrib.rb
@@ -47,7 +47,7 @@ def self.create_missing_attribs(node, attribs, options=Hash.new)
:name => attrib_hash['name']
)
end
- attrib_hash['values']['value'].each do |v|
+ attrib_hash['values']['value'].to_a.each do |v|
unless attrib.avalues.find_by_value(v)
attrib.avalues << attrib.avalues.new(:value => v)
end

0 comments on commit 7ff57bc

Please sign in to comment.