Give an example of the html code.


On 16 January 2012 12:15, Craig White <[email protected]> wrote:

> Looking to embed the html 'right guillemet' (&raquo;) inside of a link_to
> reference in my view code...
>
> <%= (role.rights.sort{|a, b| [a.controller, a.action] <=> [b.controller,
> b.action]}.collect{|rights| [link_to (rights.controller + " &raquo; " +
> rights.action, :controller => "rights", :action => "edit", :id =>
> rights.id)]}).join("<br />").html_safe -%>
>
> which results in...
>
> <a href="/rights/edit/53">groups &amp;raquo; add_member</a><br /><a
> href="/rights/edit/50">groups &amp;raquo; create</a><br /><a
> href="/rights/edit/54">groups &amp;raquo; delete_member</a><br /><a
> href="/rights/edit/52">groups &amp;raquo; destroy</a>
>
> which is not what I want obviously.
>
> (and yes, I will probably just move this to a helper once I get it working)
>
> Is it possible to embed HTML code inside the 'link_to' ?
>
> --
> Craig White ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> [email protected]
> 1.800.869.6908 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> www.ttiassessments.com
>
> Need help communicating between generations at work to achieve your
> desired success? Let us help!
>
> --
> 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.
>
>

-- 
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.

Reply via email to