Because I joined movies
with likes
it both retrieved the movie.id
and the likes.id
.
This this paperclip helper couldn't cope with two id's
so it randomly picked the likes
id.
=image_tag movie.cover.url(:expanded), :class => "expanded"
As a result wrong paths got created: iE. /movies/system/007/movie_with_id_01_image.jpg
.
I had to change my select
clause, now excluding the likes.id
.
.select("movies.*, likes.*")
.select("movies.*, likes.column_a, likes.column_b, ... , likes.column_x")
Now it finally worked again.