From 34402f44ddf33839551b25ab6677708e941801d7 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Mon, 11 Aug 2014 18:15:57 -0300 Subject: [PATCH] Fix ambiguous field on query --- app/models/article.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/article.rb b/app/models/article.rb index 1a62f5e..4cfb4e7 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -103,7 +103,7 @@ class Article < ActiveRecord::Base named_scope :by_range, lambda { |range| { :conditions => [ - 'published_at BETWEEN :start_date AND :end_date', { :start_date => range.first, :end_date => range.last } + 'articles.published_at BETWEEN :start_date AND :end_date', { :start_date => range.first, :end_date => range.last } ] }} @@ -324,7 +324,7 @@ class Article < ActiveRecord::Base def belongs_to_blog? self.parent and self.parent.blog? end - + def belongs_to_forum? self.parent and self.parent.forum? end -- libgit2 0.21.2