refactor description controller

This commit is contained in:
Tanguy PATTE 2015-08-20 15:15:20 +02:00
parent 1e385655a1
commit a265f2e48a
4 changed files with 51 additions and 45 deletions

View file

@ -12,8 +12,8 @@ class Dossier < ActiveRecord::Base
before_create :build_default_cerfa
def get_pj piece_jointe_id
pieces_jointes.where(type_piece_jointe_id: piece_jointe_id).last
def retrieve_piece_jointe_by_type type
pieces_jointes.where(type_piece_jointe_id: type).last
end
def build_default_pieces_jointes