Skip to content

Instantly share code, notes, and snippets.

@mjuneja
Created September 29, 2008 09:03
Show Gist options
  • Save mjuneja/13577 to your computer and use it in GitHub Desktop.
Save mjuneja/13577 to your computer and use it in GitHub Desktop.
ActionView::TemplateError (You have a nil object when you didn't expect it!
The error occurred while evaluating nil.public_filename) on line #6 of home/_category.html.erb:
3: <%= h(truncate(category.title, 50)) -%>
4: </div>
5: <div class="itemDesc"><%= category.description.blank? ? 'N/A ' : h(truncate(category.description, 50)) -%></div>
6: <%= link_to(image_tag(category.header_image.public_filename(:small)), category, :title => h(category.title)) -%>
7: <div class="view"><%= link_to "View all" + " " + h(truncate(category.title, 50)), category, :title => h(category.title) -%></div>
8: </div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment