Skip to content

Commit 597116e

Browse files
fix(export): format relation model name for matching collection (#718)
1 parent 05aa9f5 commit 597116e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/forest_liana/application_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def fields_per_model(params_fields, model)
162162
else
163163
model_association = model.reflect_on_association(relation_name.to_sym)
164164
if model_association
165-
model_name = model_association.class_name
165+
model_name = ForestLiana.name_for(model_association.klass)
166166
# NOTICE: Join fields in case of model with self-references.
167167
if fields[model_name]
168168
fields[model_name] = [

0 commit comments

Comments
 (0)