def get_resource_version
      resource = get_resource_ivar

      version = params[:version].try(:to_i)

      if version && version > 0 && version < resource.version
        resource.undo(nil, from: version + 1, to: resource.version)
        resource.version = version
      end

      return resource
    end
def get_resource_version
      resource = get_resource_ivar

      version = params[:version].try(:to_i)

      if version && version > 0 && version < resource.version
        resource.undo(nil, from: version + 1, to: resource.version)
        resource.version = version
      end

      return resource
    end
add support for history