rename ref_formulaire into formulaire
This commit is contained in:
parent
a807ba5ae9
commit
c78a4f655b
15 changed files with 69 additions and 63 deletions
|
@ -2,7 +2,7 @@ class Dossier < ActiveRecord::Base
|
|||
has_one :etablissement
|
||||
has_one :entreprise
|
||||
has_many :pieces_jointes
|
||||
belongs_to :ref_formulaire
|
||||
belongs_to :formulaire
|
||||
has_many :commentaires
|
||||
|
||||
delegate :siren, to: :entreprise
|
||||
|
@ -13,6 +13,6 @@ class Dossier < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def liste_piece_justificative
|
||||
ref_formulaire.liste_piece_justificative
|
||||
formulaire.liste_piece_justificative
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class RefFormulaire < ActiveRecord::Base
|
||||
class Formulaire < ActiveRecord::Base
|
||||
has_many :types_piece_jointe
|
||||
|
||||
def liste_piece_justificative
|
|
@ -1,8 +1,8 @@
|
|||
class TypePieceJointe < ActiveRecord::Base
|
||||
|
||||
# TODO: test this methods
|
||||
def self.get_liste_piece_jointe ref_formulaire
|
||||
where ("\"CERFA\" = '#{ref_formulaire.ref_demarche}'")
|
||||
def self.get_liste_piece_jointe(formulaire)
|
||||
where ("\"CERFA\" = '#{formulaire.ref_demarche}'")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue