There's a field in my resource that I want to set to 1
if it's nil
in the model. I have the following code, but the resource is still producing minimum_approvers: nil
Any ideas on what's going on?
module V1
class EntityResource < BaseResource
model_hint model: Entity
attribute :logo
attribute :minimum_approvers
def minimum_approvers
@model.minimum_approvers.nil? ? 1 : @model.minimum_approvers
end