grape-entity icon indicating copy to clipboard operation
grape-entity copied to clipboard

Adding default value to expose

Open rahul404 opened this issue 5 years ago • 0 comments

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"

rahul404 avatar Dec 04 '19 07:12 rahul404