Skip to content

Commit eb703a0

Browse files
committed
Wrap order query by Arel.sql for Rails >= 6.0
1 parent 59baa08 commit eb703a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/text_block.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class TextBlock < ActiveRecord::Base
88
validates_numericality_of :position, :only_integer => true
99
before_create :set_position
1010

11-
scope :sorted, ->{ order('project_id IS NOT NULL, project_id ASC, position ASC') }
11+
scope :sorted, ->{ order(Arel.sql('project_id IS NOT NULL, project_id ASC, position ASC')) }
1212

1313
private
1414

0 commit comments

Comments
 (0)