Commit e5affcf1ee37b6d355855325b7b6ea983a443bff
Committed by
Dmitriy Zaporozhets
1 parent
81fc5137
Exists in
master
and in
4 other branches
Fixed default scope deprecation warning
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/event.rb
@@ -18,7 +18,7 @@ class Event < ActiveRecord::Base | @@ -18,7 +18,7 @@ class Event < ActiveRecord::Base | ||
18 | attr_accessible :project, :action, :data, :author_id, :project_id, | 18 | attr_accessible :project, :action, :data, :author_id, :project_id, |
19 | :target_id, :target_type | 19 | :target_id, :target_type |
20 | 20 | ||
21 | - default_scope where("author_id IS NOT NULL") | 21 | + default_scope { where.not(author_id: nil) } |
22 | 22 | ||
23 | CREATED = 1 | 23 | CREATED = 1 |
24 | UPDATED = 2 | 24 | UPDATED = 2 |