# ROR and Thickbox

**URL:** <https://www.ruby-forum.com/t/ror-and-thickbox/118801>\
**Category:** Rails\
**Created:** [October 31, 2007, 1:48am UTC](https://www.ruby-forum.com/t/ror-and-thickbox/118801 "2007-10-31T01:48:15Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexander\_Bierbraue](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8c91f0/32.png) [@Alexander\_Bierbraue](https://www.ruby-forum.com/u/Alexander_Bierbraue)\
**Post date:** [October 31, 2007, 1:48am UTC](https://www.ruby-forum.com/t/ror-and-thickbox/118801/1 "2007-10-31T01:48:15Z")

</div>

Hi there,

I’m trying at present to get thickbox (and jqeury) work with ROR.

Well… the first step I made was adding the javascripts of thickbox and  
jqeury to my controller:

Then I added the following line to jqeury.js at the bottom:

jQuery.noConflict();

Now, I had to replace all $() in thickbox.js with jQuery()… a simple  
find and replace made it…

Now, I wanted to test it out and added the following code to one of my  
rhtml’s:

\<a href="\<%= url\_for\_file\_column(“adimage”, “image”) %\>" title="\<%=  
@adimage.displayname %\>" class=“thickbox”\>  
\<%= image\_tag url\_for\_file\_column(“adimage”, “image”,“thumb”) %\>

This code works so far… a modal windows gets opened but the image  
doesn’t gets displayed… and I found the erorr. The browser tries to  
fetch the url with a randon number at the end

(example): URL+random=656565655

My app tells me then, that this url couldn’t be found… if I remove the  
random-stuff it works… but well… thickbox adds me this random-string  
to the url… when I remove this url, thickbox doesn’t work anymore.

Does anyone know a fix for this problem ?? maybe a url-rewrite or  
something similar ??

Bye and thanx for reading,

Alex
