grape-entity
grape-entity copied to clipboard
Adding default value to expose
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"