Skip to content

Instantly share code, notes, and snippets.

@maasdesigner
Created September 4, 2013 19:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maasdesigner/6441728 to your computer and use it in GitHub Desktop.
Save maasdesigner/6441728 to your computer and use it in GitHub Desktop.
NoMethodError in Refinery/pages#show
Showing /home/maasdesigner/Desktop/metroson/app/views/refinery/photo_gallery/albums/_photos.html.erb where line #10 raised:
undefined method `preview_link' for #<Refinery::PhotoGallery::Photo:0x9e2c580>
Extracted source (around line #10):
7: <ul id="gallery" class="clearfix">
8: <% photos_for_page.each_with_index do |photo, index| %>
9: <li>
10: <%= link_to (image_tag photo.preview_link(:album), :width => Refinery::PhotoGallery.album_dimensions[0], :height => Refinery::PhotoGallery.album_dimensions[1] ), photo.link_url, {
11: :target=> "_blank",
12: :class=>"fancybox",
13: :data =>{:title=> t('.image') + ' ' + (index + 1 ).to_s + '/' + photos_for_page.total_pages.to_s + ' ' + photo.title + '<br/><br/>' + photo.description},
Trace of template inclusion: /home/maasdesigner/.rvm/gems/ruby-1.9.3-p448/gems/refinerycms-photo-gallery-0.1.2/app/views/refinery/photo_gallery/albums/_show.html.erb, app/views/refinery/pages/show.html.erb
Rails.root: /home/maasdesigner/Desktop/metroson
Application Trace | Framework Trace | Full Trace
app/views/refinery/photo_gallery/albums/_photos.html.erb:10:in `block (2 levels) in _app_views_refinery_photo_gallery_albums__photos_html_erb__665658958_90649370'
app/views/refinery/photo_gallery/albums/_photos.html.erb:8:in `block in _app_views_refinery_photo_gallery_albums__photos_html_erb__665658958_90649370'
app/views/refinery/photo_gallery/albums/_photos.html.erb:1:in `_app_views_refinery_photo_gallery_albums__photos_html_erb__665658958_90649370'
app/views/refinery/pages/show.html.erb:2:in `_app_views_refinery_pages_show_html_erb___367567437_82412350'
Request
Parameters:
{"path"=>"doktorlarimiz",
"locale"=>:en,
"page"=>1}
Show session dump
Show env dump
Response
Headers:
None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment