Simplify RNAAdapter#to_params and unify the type of objects it returns
This commit is contained in:
parent
caf2e50954
commit
681e33b850
1 changed files with 1 additions and 4 deletions
|
@ -5,10 +5,7 @@ class ApiEntreprise::RNAAdapter
|
|||
end
|
||||
|
||||
def to_params
|
||||
if data_source.present?
|
||||
if data_source[:association][:id].nil?
|
||||
return nil
|
||||
end
|
||||
if data_source.present? && data_source[:association][:id].present?
|
||||
params = data_source[:association].slice(*attr_to_fetch)
|
||||
params[:rna] = data_source[:association][:id]
|
||||
params
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue