bullet-train-pro / bullet_train-action_models

Other
4 stars 1 forks source link

Fix string transformation for Performs Import action #95

Closed gazayas closed 3 months ago

gazayas commented 10 months ago

We were using incorrect strings to transform content in newly scaffolded controllers for the Performs Import action, so I fixed that here.

Also, after some experimentation, I figured out that we can only use CSVs with underscored strings as column names. For example:

project_id,title
1,foo
2,bar
3,baz

When loading a CSV, we don't have a check of some sort to ensure the column names conform to this standard. Should we change the strings when loading, or should we handle this another way?

Tests

Tests are currently failing due to https://github.com/bullet-train-co/bullet_train/issues/1153.

The actual Action Model tests we have in place were passing because we scaffold a CsvImport model which matched the improperly transformed strings.