@ -56,8 +56,9 @@ class News < ActiveRecord::Base
where(conditions).limit(limit).newest_first.includes(:author, :project)
end
# table_name shouldn't be needed :(
def self.newest_first
order 'created_on DESC'
order "#{table_name}.created_on DESC"
def new_comment(attributes = {})
@ -139,8 +139,9 @@ class Project < ActiveRecord::Base
where(conditions).limit(limit).newest_first
# Returns a SQL :conditions string used to find all active projects for the specified user.