Skip to content

:attachment interpolation & updates to Inflector pluralization  #194

@ccwittwer

Description

@ccwittwer

A consideration for a future update might be to stop using Inflector pluralization on :attachment interpolation when creating the location for files. The Inflector package is routinely getting updates to how certain words are pluralized and when those updates are pulled into a project with Stapler, it can change Stapler's construction of file locations.

For example, a project with an attachment named "audio" was formerly stored in /audios/[id]/[style]/[filename], but in Inflector v1.3, the pluralization for "audio" was changed to "audio" (instead of "audios"), which resulted in Stapler expecting files to be located at /audio/[id]/[style]/[filename]; breaking the connection to those files.

It may be a better approach to interpolate :attachment with the attachment name as specified on the model, rather than pluralizing it. And/or allow for the plural form to be specified on the model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions