Forum: Ruby on Rails file_column partial still calling undefined method `cover_re

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
on 2007-05-19 06:44
(Received via mailing list)
I'm getting the error " undefined method `cover_relative_path' " when
I launch my app. When I'm using the @upcoming.each the file_column
can't find the cover.

The cover is found with no problem in my index page which has the
identical code. Both actions, index and upcoming, are under the albums
controller. The cover is located in the db under albums>cover. The
difference between my index and upcoming is that I use .each do |i|
statement in the upcoming because I'm using pagenation and search and
it doesnt seem to find the variables without that. In index I use
@albums = albums as the file_column wiki suggests for partials but it
doesnt seem to do anything in this scenario.

btw, the varliables like permalink come up fine, its just the cover
thats not working

<% @upcoming.each do |i| %>
<div id="album">
<% @upcoming = upcoming -%>
    <% @upcoming.each do |i| %>
<div id="info"><a href="<%= albums_url(:permalink => i.permalink) %>">

<%= image_tag url_for_file_column("albums", "cover"), :id => 'cover'

        <h2><% @title = i.artist + " - "  + i.album %><a
href="albumview.htm"><%= link_to @title, albums_url(:permalink =>
i.permalink) %></a></h2>
        <span id="subbar">[<%= i.genre %>] / released: <%= %></
span><%= %><br>
        <span id="subtext"><a href="#">Hype</a> ( +45 ) or <a
href="#">Drop</a> ( -7 ) <span id="subtext"> </span></span> </div></
<% end %>

def upcoming
     @sorter = self, %w(artist album date),
@params['sort'], @params['order'], 'date', 'ASC'
     @albums_pages = self, Albums.count, 5,
     @upcoming = Albums.find :all, @sorter.to_sql,

    if request.xml_http_request?
      render :partial => "upcoming", :layout => false

  render :layout => 'albums_upcoming'
This topic is locked and can not be replied to.