liftedmedia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-19 02:44 UTC
file_column partial still calling undefined method `cover_relative_path''
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 VIEW ----------------------------------------------------------- <% @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'' %> </a><br> <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: <%= i.date %></ span><%= i.info %><br> <span id="subtext"><a href="#">Hype</a> ( +45 ) or <a href="#">Drop</a> ( -7 ) <span id="subtext"> </span></span> </div></ div> <% end %> CONTROLLER ----------------------------------------------------------- def upcoming @sorter = SortingHelper::Sorter.new self, %w(artist album date), @params[''sort''], @params[''order''], ''date'', ''ASC'' @albums_pages = Paginator.new self, Albums.count, 5, @params[''page''] @upcoming = Albums.find :all, @sorter.to_sql, @albums_pages.current.to_sql if request.xml_http_request? render :partial => "upcoming", :layout => false end render :layout => ''albums_upcoming'' end --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
liftedmedia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-19 02:47 UTC
file_column partial still calling undefined method `cover_relative_path''
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 preview without erb @upcoming.each do |i| link albums_url(:permalink => i.permalink) image_tag url_for_file_column("albums", "cover"), :id => ''cover'' --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Consider upload_column, seem''s to be a lot less bugy http://uploadcolumn.rubyforge.org/ with new versions of rails liftedmedia-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> 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. >-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---