Dynamically modify id within html tag using embedded ruby -


how can dynamically set id within html tag?

specifically, i'm trying this:

<td <% "id=unit_" + unit.id.to_s %> > *content goes here*  </td> 

where unit.id integer variable.

can used embedded ruby (i.e. <% %>) within html tag this?

if not, how else can achieve i'm trying do?

<td id="<%= unit.id.to_s %>">...</td> 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -