I have found a new use case for the gem - copy data from one Fortnox instance to another. The current implementation tries to save us an API call by checking the dirty tracking of the model and see if it's already saved before trying to save it. But if you want to fetch a resource from one Fortnox instance and save it to another, the model is marked as saved and it will not be saved.
One proposal is to add a force override:
def save(entity, force: false)
return save_new(entity) if force
return true if entity.saved?
return save_new(entity) if entity.new?
update_existing(entity)
end
I have found a new use case for the gem - copy data from one Fortnox instance to another. The current implementation tries to save us an API call by checking the dirty tracking of the model and see if it's already saved before trying to save it. But if you want to fetch a resource from one Fortnox instance and save it to another, the model is marked as
saved
and it will not be saved.One proposal is to add a
force
override: