'RESTful method handler
@param r: the S3Request instance
@param attr: controller attributes for the request'

def apply_method(self, r, **attr):

    output = dict()
    resource = r.resource
    if (resource.tablename == self.TABLENAME):
        return resource.crud.select(r, **attr)
    elif (resource.tablename == 'sync_repository'):
        pass
    elif r.interactive:
        here = ('%s.%s' % (r.controller, r.function))
        sync_log = current.s3db[self.TABLENAME]
        sync_log.resource_name.readable = False
        query = (sync_log.resource_name == resource.tablename)
        r = r.factory(prefix='sync', name='log', args=[])
        s3 = current.response.s3
        s3.filter = query
        s3.prep = None
        s3.postp = None
        s3.actions = [dict(label=str(current.T('Details')), _class='action-btn', url=URL(c='sync', f='log', args=['[id]'], vars={'return': here}))]
        output = r(subtitle=None, rheader=self.rheader)
    else:
        r.error(415, current.ERROR.BAD_FORMAT)
    return output
