Skip to content

Custom methods in Rails Form Builders do not render within Phlex components without being wrapped in raw #282

Closed
@tcannonfodder

Description

@tcannonfodder

Hey y'all!

I've got a minimal reproduction of this here: practical-computer/phlex-form-builder-bug@167a535

In short, if you've written custom methods for a FormBuilder subclass, their output is not rendered unless you wrap it in raw(), even if you're using the @template instance to build out the buffer in the form builder

This is a gnarly regression from Phlex 1, especially if you're leveraging FormBuilders to wrap around ActiveModel & build usable form markup that is aware of form properties.

I tried to keep the reproduction as straightforward as possible, and contained into a single commit for easier debugging; let me know if there's anything I can help with!

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