Skip to content

Should select show a prompt when its attribute is false? #51602

Open
@mrj

Description

@mrj

At the moment the attribute select helper adds the empty prompt option if the attribute is blank. However blank? is true for false, meaning that the prompt will still be shown if a boolean attribute has been set to the valid value of false rather than its initial null.

Should the ActionView line linked above instead be: if value != false && value.blank? && options[:prompt]?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions