There are few possibilities. Easiest will be set session variable after object was created and check it before. Or set a remote_id for created object which will be a hash included in the POST array and check if object exists with such remote_id if so then you skip creation process.