Dossier: remove unused ordered_commentaires

as commentaires are sorted on the view _messagerie.haml.html
dossier_facade.commentaires.object.sort
This commit is contained in:
Simon Lehericey 2017-07-20 10:40:40 +02:00
parent 7414190d2a
commit 5ec0e2ed18
2 changed files with 1 additions and 5 deletions

View file

@ -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

View file

@ -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'