From d1246cba22c3c404731ea66e57018d6eef85e778 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Mon, 6 Apr 2015 21:40:42 -0300 Subject: [PATCH] rails4: add missed param --- app/models/article.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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