Ruby version: 2.3.1
Rails version: 5.0.5
I am using Google's dataLayer to record ecommerce events in my site. We are in the middle of an upgrade from rails 4 to 5 and I'm running into a wall with one of my rails helpers. I use a helper to generate a product_list and inject it into the view so I can send it to the dataLayer.
In rails 4 the dom reflects what I write in the helper, including the quotes I need to include for the format. In rails 5 however, the quotes are being converted to unicode and I can't figure out why or how to avoid this. This is not happening when I bind on the method in the terminal, it's only happening when it is loaded in the dom. I've tried adding sanitize(), .html_safe, converting this to a hash and converting this to JSON and nothing is working.
Right now it is working on rails 4 like this:
ViewModelA
What I get in the DOM:
ViewModelB
What is being returned on the DOM in rails 5:
public class ViewModelB : ViewModelA
{
public ViewModelA() : base() { }
}
答案 0 :(得分:1)
Not sure where you called Intent i=new Intent(B.this,C.class);
startActivity(i);
, I quickly added this to a view I had in Rails 5 to attempt to replicate and here are my results:
View Helper
Intent i=new Intent(C.this,D.class);
startActivity(i);
finish();
View
Intent i=new Intent(D.this,E.class);
startActivity(i);
finish();
Generated Page
html_safe