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