lib/amee/profile_item.rb in Floppy-amee-2.0.4 vs lib/amee/profile_item.rb in Floppy-amee-2.0.5
- old
+ new
@@ -269,12 +269,14 @@
else
category = Category.parse(connection, response)
location = category.full_path + "/" + category.items[0][:path]
end
if get_item == true
- options = {}
- options[:format] = format if format
- return AMEE::Profile::Item.get(connection, location, options)
+ get_options = {}
+ get_options[:returnUnit] = options[:returnUnit] if options[:returnUnit]
+ get_options[:returnPerUnit] = options[:returnPerUnit] if options[:returnPerUnit]
+ get_options[:format] = format if format
+ return AMEE::Profile::Item.get(connection, location, get_options)
else
return location
end
rescue
raise AMEE::BadData.new("Couldn't create ProfileItem. Check that your information is correct.")