Move transform_keys calls directly to #process_params methods
This commit is contained in:
parent
a3fd271b00
commit
5d188c191d
5 changed files with 22 additions and 22 deletions
|
@ -9,7 +9,7 @@ class ApiEntreprise::EntrepriseAdapter < ApiEntreprise::Adapter
|
|||
def process_params
|
||||
params = data_source[:entreprise].slice(*attr_to_fetch)
|
||||
params[:date_creation] = Time.at(params[:date_creation]).to_datetime
|
||||
params
|
||||
params.transform_keys { |k| :"entreprise_#{k}" }
|
||||
end
|
||||
|
||||
def attr_to_fetch
|
||||
|
|
|
@ -9,7 +9,7 @@ class ApiEntreprise::RNAAdapter < ApiEntreprise::Adapter
|
|||
if data_source[:association][:id].present?
|
||||
params = data_source[:association].slice(*attr_to_fetch)
|
||||
params[:rna] = data_source[:association][:id]
|
||||
params
|
||||
params.transform_keys { |k| :"association_#{k}" }
|
||||
else
|
||||
{}
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue