On Jan 16, 2012, at 11:21 AM, Tim Shaffer wrote:
> The problem is that the "inner" string is not marked as html_safe. In your
> link_to tag, this string is not considered html_safe:
>
> link_to(rights.controller + " » " + rights.action, :controller =>
> "rights", :action => "edit", :id => rights.id)
>
> Colin's suggestion, which is the solution, is to mark the inner string as
> html_safe. The easiest way to do this is to use the #{} notation instead of
> string concatenation:
>
> link_to("#{rights.controller} » #{rights.action}".html_safe,
> :controller => "rights", :action => "edit", :id => rights.id)
----
I see said the blind man
and thanks Colin for the solution which was not apparent to me and I did have
to clean up the syntax errors but it works.
Thanks
Craig
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.