Rails 4, Ruby 2, jQuery 1.11
My app has tables built using DataTables. I am using jQuery to modify those table's HTML. I'm trying to add an image which is in assets/images but I cannot seem to determine the path necessary to access it. Since I am editing the HTML after it has been preprocessed, it is native HTML and I cannot use Rails variables within it.
I can get Rails to recognize the image is there, or more specifically RubyMine. Since I am in JavaScript, the path "../images" can access the image. But, this doesn't work for HTML.
My question is, given that an image is in app/assets/images, what path to I have to specify for native HTML to be able to access that image?
$('input[type=search]').each(function () {
var $this = $(this);
$this.addClass("theSearch");
$('.theSearch')
.append('<img id="clrImg" class="clrSearch" src="../images/DeleteRed.png" />');
...
FWIW, this is going to be a button that clears a search field when clicked. Right now, it is working using an "X" but that is just ugly....
I should note that I have tried many permutations of /app/assets/images/...