Rails / omitted from link_to?
Posted
by dannymcc
on Stack Overflow
See other posts from Stack Overflow
or by dannymcc
Published on 2010-06-12T17:43:30Z
Indexed on
2010/06/12
23:03 UTC
Read the original article
Hit count: 208
Hi Everyone,
I am using a Gem to communicate with FreeagentCentral via their API. I have the following code to display a link to the relevant freeagent project:
<%= link_to "#{image_tag('/images/icons/Spinning Beach Ball.png')} Freeagent Project", "#{Freeagent::Base.site.to_s + Freeagent::Project.element_path(@kase.freeagent_id).gsub(/\A\//, '').gsub!(/.xml/,'')}" if @kase.freeagent_id %>
The problem - There is a / omitted from the URL which makes the url like this:
https://XXXXX.freeagentcentral.comprojects/12345
where it should be:
https://XXXXX.freeagentcentral.com/projects/12345
This may be simple, but to me - it's driving me crazy!
Thanks,
Danny
© Stack Overflow or respective owner