javascript is adding assets folder to image path (rails 3) -


i have js code looks smth this:

... html_string = '<img src="urlgoeshere" >' url = "http://www.remote_site.com/address/to/my_pic.png" html_string.replace(new regexp("urlgoeshere", 'g'), url) $('body').append html_string ... 

so.. should make this, right?

<img src="http://www.remote_site.com/address/to/my_pic.png" > 

instead this:

<img src="/assets/http://www.remote_site.com/address/to/my_pic.png" > 

can't image_tag.

how rid of /assets/ part?

yes think so.

add image_tag javascript code embedded in erb template making me crazy. use raw html tag ok.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -