amkirwan/handlebar-cms — Issue #4: editing fresh article collection
Author: jibblett
Created: 2012-01-21 23:16:52+00:00
State: open

created an article collection in a fresh site (same thing happens in demo.bwhanesthesia.org site), then click on the name of the article collection to add articles ->

undefined method `article_collection' for nil:NilClass

app/views/admin/articles/index.html.haml:1:in `_app_views_admin_articles_index_html_haml__3036780359232826692_70210034131180'
app/controllers/admin/articles_controller.rb:12:in `index'

Extracted source (around line #1):

1: - header_content 'shared/header_wrapper', :title => "Aritcles in the Collection #{@articles.first.article_collection.name.titleize}", :object => :Article do

i.e., you're calling @articles.first which returns nil, then .article_collection on that.