I am creating a data.xml.builder file that I will feed into javascript library to create a table.
A short excerpt is the following
xml.tag!("row",{"id" => item.id}) do
xml.tag!("cell", item.name)
end
I would like the item.name to also be a link to the item_path in the table.
I know that I can use
xml.a(item.name, 'href' => item_path(item))
in order to create a link. However, I need the custom tag of "cell" in order for the javascript library to pick it up into the proper spot in the table.
Therefore, what I am looking to do is combine these two into something that looks like this. But i know this doesn't work.
xml.tag!("cell", xml.a(item.name, 'href' => item_path(item)))