One way:
javascript_tag do
== "var all_product_ids = #{existing_ids.to_json};"
== "var products_json = #{@filter.data.to_json};"
or:
= %Q{
var all_product_ids = #{existing_ids.to_json};
var products_json = #{@filter.data.to_json};
}
are there any better solutions for this?
In Slim
javascript:
var all_product_ids = "#{existing_ids.to_json}";
var products_json = "#{@filter.data.to_json}";