I am trying to create a toggle which is basically two images. A plus icon and a minus icon.
Unfortunately if i use "assets/" it works on development but not on production - it wont find the image. I understand its probably because of asset digesting.
$(".directions-and-alternative-options-toggle").on("click", function(){
if($(this).hasClass("collapsed")){
$(this).find("img").attr("src", "/assets/minimize-icon.png");
} else {
$(this).find("img").attr("src", "/assets/expand-icon.png");
}
});
<a class="directions-and-alternative-options-toggle collapsed" type="button" data-toggle="collapse" data-target="#reveal-key-directions-in-<%= event.event_id %>" aria-expanded="false" aria-controls="collapse1">
<%= image_tag "expand-icon.png", class: "expand-icon pull-right" %>
</a>
is there any way to get the digested asset path?