[#2622] Change sort to proper JSONB

This commit is contained in:
Frederic Merizen 2018-09-20 17:02:28 +02:00
parent 68608307ad
commit 1419e9b73f
6 changed files with 6 additions and 9 deletions

View file

@ -132,7 +132,7 @@ module NewGestionnaire
'table' => table,
'column' => column,
'order' => order
}.to_json
}
procedure_presentation.update(sort: sort)

View file

@ -307,7 +307,7 @@ class Procedure < ApplicationRecord
'table' => 'self',
'column' => 'id',
'order' => 'desc'
}.to_json
}
end
def whitelist!

View file

@ -1,10 +1,6 @@
class ProcedurePresentation < ApplicationRecord
belongs_to :assign_to
def sort
JSON.parse(read_attribute(:sort))
end
def filters
JSON.parse(read_attribute(:filters))
end