Display RNA information on partial dossier entreprise information
This commit is contained in:
parent
05298f7a40
commit
a2a5d63c0d
9 changed files with 92 additions and 9 deletions
|
@ -4,7 +4,7 @@ class SIADE::RNAAdapter
|
|||
end
|
||||
|
||||
def data_source
|
||||
@data_source ||= JSON.parse(SIADE::API.rna(@siren), symbolize_names: true)
|
||||
@data_source ||= JSON.parse(SIADE::API.rna(@siret), symbolize_names: true)
|
||||
end
|
||||
|
||||
def to_params
|
||||
|
@ -12,8 +12,15 @@ class SIADE::RNAAdapter
|
|||
|
||||
data_source[:association].each do |k, v|
|
||||
params[k] = v if attr_to_fetch.include?(k)
|
||||
|
||||
end
|
||||
|
||||
params[:association_id] = params[:id]
|
||||
params.delete(:id)
|
||||
|
||||
params
|
||||
rescue
|
||||
nil
|
||||
end
|
||||
|
||||
def attr_to_fetch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue