Commit d1246cba22c3c404731ea66e57018d6eef85e778
1 parent
20560074
Exists in
master
and in
20 other branches
rails4: add missed param
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/article.rb
... | ... | @@ -253,7 +253,7 @@ class Article < ActiveRecord::Base |
253 | 253 | |
254 | 254 | # retrieves all articles belonging to the given +profile+ that are not |
255 | 255 | # sub-articles of any other article. |
256 | - scope :top_level_for, -> { | |
256 | + scope :top_level_for, -> (profile) { | |
257 | 257 | where 'parent_id is null and profile_id = ?', profile.id |
258 | 258 | } |
259 | 259 | ... | ... |