From 1f380c99da217d5dacbee4ae569d2c890ce71e9a Mon Sep 17 00:00:00 2001 From: Rafael Martins Date: Sat, 26 May 2012 16:37:55 +0000 Subject: [PATCH] Small fix for Article when there's no profile --- app/models/article.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/article.rb b/app/models/article.rb index 99728c6..582e162 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -674,7 +674,7 @@ class Article < ActiveRecord::Base {:comments => {:fields => [:title, :body, :author_name, :author_email]}}, {:categories => {:fields => [:name, :path, :slug, :lat, :lng, :acronym, :abbreviation]}}, ], :facets => facets_option_for_solr, - :boost => proc { |a| 10 if a.profile.enabled }, + :boost => proc { |a| 10 if a.profile && a.profile.enabled }, :if => proc{ |a| ! ['RssFeed'].include?(a.class.name) } handle_asynchronously :solr_save -- libgit2 0.21.2