Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- HELPER:
- module StarHelper
- def format_cell(val)
- case val
- when "n/a"
- cell = "n/a"
- when nil
- cell = "?"
- else
- cell = %{ link_to "yes", #{val} }
- end
- end
- end
- VIEW:
- <td style="text-align:center;"><%= format_cell line.base_file %></td>
- output:
- table cell contains link_to "yes", data_101202.xls rather than the HTML for linking yes to the filename. in other words, the string from the helper is being printed rather than the HTML rendered.
Add Comment
Please, Sign In to add comment