lib/jcompiler.rb in jcompiler-0.1.24 vs lib/jcompiler.rb in jcompiler-0.1.25

- old
+ new

@@ -11,10 +11,10 @@ # image_square: 'absolute_url(brand.image_file.url(:square))', # url: brand_ labels: '"#{brand.new_arrival? ? \'["NEW"]\' : \'[]\'}"' }.map do |key, code| v = eval(code) - "\"#{attr}\":#{v.is_a?(String) ? ActiveSupport::JSON.encode(v) : v ? v.to_s : 'null'}" + "\"#{key}\":#{v.is_a?(String) ? ActiveSupport::JSON.encode(v) : v ? v.to_s : 'null'}" end end def self.a(brands) brands.map do |brand|