Commit 34402f44ddf33839551b25ab6677708e941801d7

Authored by Braulio Bhavamitra
1 parent 9d9f94ae

Fix ambiguous field on query

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/models/article.rb
@@ -103,7 +103,7 @@ class Article < ActiveRecord::Base @@ -103,7 +103,7 @@ class Article < ActiveRecord::Base
103 103
104 named_scope :by_range, lambda { |range| { 104 named_scope :by_range, lambda { |range| {
105 :conditions => [ 105 :conditions => [
106 - 'published_at BETWEEN :start_date AND :end_date', { :start_date => range.first, :end_date => range.last } 106 + 'articles.published_at BETWEEN :start_date AND :end_date', { :start_date => range.first, :end_date => range.last }
107 ] 107 ]
108 }} 108 }}
109 109
@@ -324,7 +324,7 @@ class Article < ActiveRecord::Base @@ -324,7 +324,7 @@ class Article < ActiveRecord::Base
324 def belongs_to_blog? 324 def belongs_to_blog?
325 self.parent and self.parent.blog? 325 self.parent and self.parent.blog?
326 end 326 end
327 - 327 +
328 def belongs_to_forum? 328 def belongs_to_forum?
329 self.parent and self.parent.forum? 329 self.parent and self.parent.forum?
330 end 330 end