diff --git a/app/facades/dossier_facades.rb b/app/facades/dossier_facades.rb index dfb7f73ab..a5143b6b3 100644 --- a/app/facades/dossier_facades.rb +++ b/app/facades/dossier_facades.rb @@ -38,7 +38,7 @@ class DossierFacades end def commentaires - @dossier.ordered_commentaires.where(champ_id: @champ_id).decorate + @dossier.commentaires.where(champ_id: @champ_id).decorate end def procedure diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 50b9f1ed3..a53d49db3 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -128,10 +128,6 @@ class Dossier < ActiveRecord::Base champs.joins(', types_de_piece_justificative').where("pieces_justificatives.type_de_piece_justificative_id = types_de_piece_justificative.id AND types_de_piece_justificative.procedure_id = #{procedure.id}").order('order_place ASC') end - def ordered_commentaires - commentaires.order(created_at: :desc) - end - def next_step! role, action, motivation = nil unless %w(initiate follow update comment receive refuse without_continuation close).include?(action) fail 'action is not valid'