I have a Kendo grid that is being binded to a remote data source.
I would like to insert a link to a google search when values in a specific column is Null.
<%= company_URL || link_to("Search", "https://www.google.com/search?q=#{company.name}%20leadership%20team") %>
I don't need to store this link in the database, so its more a presentation concern. I tried to put this in the JS using the template attribute, but I'm unclear how to write this as a function that would look like this:
columns: [ {
field: "name",
template: function(dataItem) {
return "<strong>" + kendo.htmlEncode(dataItem.name) + "</strong>";
}
Or is it better to put this in the controllers or serializer since links are a presentation concern? I'm using active_model_serializer