Sunny Bogawat wrote:
> Hi, i need to construct a link  as following
> 
>   "<a href=\"#{CONFIG['URLS']['Xyz']}\#{url}\"#{tag_options}>#{name ||
> url}</a>"
> 
>   But here due to escape character #{url} not give actual value it
> treated as a string. how to solve this ?
> if i do
> "<a href=\"#{CONFIG['URLS']['xyz']}\\#{url}\"#{tag_options}>#{name ||
> url}</a>"
> then #{url} gives me proper value but link is wron constructed?
> 
>  please suggest me solution.

Not sure, but there is an "h(...)" function available to 'escape' code 
the enclosed content. Have you tried it?
-- 
Posted via http://www.ruby-forum.com/.

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