Skip to content

Adding default value to expose  #327

Open
@rahul404

Description

@rahul404

Is there a way to add a default value to expose in case of the value is not present?
For example

expose :tags do |filter|
  filter[:tags].present? ? filter[:tags] : "all"
end

could be replaced by
expose :tags, default: "all"

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