def create
      ImageScratch.where(ownable: current_user).destroy_all

      # The persistence code that follows is suboptimal.  I'm a bit tired
      # right now.  Don't see it. Needs to be fixed.  Issue should be raised.
      # TODO Raise issue here.
      ActiveRecord::Base.transaction do
        @scratch = ImageScratch.new(ownable: current_user);
        authorize! :create, @scratch
        @scratch.save!
        @scratch.image_version = ImageVersion.new(image: image_scratch_params[:image], ownable: @scratch);
        @scratch.save!
      end

    end
def create
      ImageScratch.where(ownable: current_user).destroy_all

      # The persistence code that follows is suboptimal.  I'm a bit tired
      # right now.  Don't see it. Needs to be fixed.  Issue should be raised.
      # TODO Raise issue here.
      ActiveRecord::Base.transaction do
        @scratch = ImageScratch.new(ownable: current_user);
        authorize! :create, @scratch
        @scratch.save!
        @scratch.image_version = ImageVersion.new(image: image_scratch_params[:image], ownable: @scratch);
        @scratch.save!
      end

    end
POST /image_scratches