[ad_1]
I have table, in which cells are populated with data from a Ruby function call, which itself is a String Interpolation.
I want to take the first 5 characters of this string, and output it in the cell.
My problem is, is that what is outputted is not the result of the interpolation, but the variables itself.
Where am I going wrong here?
.slim table cell
td.event
== activity_cell.subtitle[1, 5]
activity_cell.rb
def subtitle
"#{fa_icon(icon1)} #{model_fa_icon} #{type_text} #{html_escape(extra_text)}"
end
output:
"#{fa
Note:
The string interpolation is rendered correctly if I’m not splitting the string to get the first X characters.
[ad_2]