lib/jcompiler.rb in jcompiler-0.1.16 vs lib/jcompiler.rb in jcompiler-0.1.17
- old
+ new
@@ -1,7 +1,7 @@
class Jcompiler
def self.b(brand)
- ["\"id\":#{brand.id}", "\"name\":\"#{brand.name}\""]
+ ["\"id\":#{brand.id}", "\"name\":#{ActiveSupport::JSON.encode(brand.name)}"]
end
def self.a(brands)
brands.map do |brand|
"{#{b(brand).join(',')}}"