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:
parent
7414190d2a
commit
5ec0e2ed18
2 changed files with 1 additions and 5 deletions
|
@ -38,7 +38,7 @@ class DossierFacades
|
||||||
end
|
end
|
||||||
|
|
||||||
def commentaires
|
def commentaires
|
||||||
@dossier.ordered_commentaires.where(champ_id: @champ_id).decorate
|
@dossier.commentaires.where(champ_id: @champ_id).decorate
|
||||||
end
|
end
|
||||||
|
|
||||||
def procedure
|
def procedure
|
||||||
|
|
|
@ -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')
|
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
|
end
|
||||||
|
|
||||||
def ordered_commentaires
|
|
||||||
commentaires.order(created_at: :desc)
|
|
||||||
end
|
|
||||||
|
|
||||||
def next_step! role, action, motivation = nil
|
def next_step! role, action, motivation = nil
|
||||||
unless %w(initiate follow update comment receive refuse without_continuation close).include?(action)
|
unless %w(initiate follow update comment receive refuse without_continuation close).include?(action)
|
||||||
fail 'action is not valid'
|
fail 'action is not valid'
|
||||||
|
|
Loading…
Reference in a new issue