diff --git a/app/models/article.rb b/app/models/article.rb index 86e0025..d00ad73 100644 --- a/app/models/article.rb +++ b/app/models/article.rb @@ -253,7 +253,7 @@ class Article < ActiveRecord::Base # retrieves all articles belonging to the given +profile+ that are not # sub-articles of any other article. - scope :top_level_for, -> { + scope :top_level_for, -> (profile) { where 'parent_id is null and profile_id = ?', profile.id } -- libgit2 0.21.2