def __resource_with_deleted(self, member_name, collection_name, **kwargs):
 collection_path = (((kwargs.get('path_prefix', '') + '/') + collection_name) + '/deleted')
 member_path = (collection_path + '/{id}')
 self.connect(('deleted_' + collection_name), collection_path, controller=collection_name, action='index', deleted=True, conditions=dict(method=['GET']))
 self.connect(('deleted_' + member_name), member_path, controller=collection_name, action='show', deleted=True, conditions=dict(method=['GET']))
 self.connect(('undelete_deleted_' + member_name), (member_path + '/undelete'), controller=collection_name, action='undelete', conditions=dict(method=['POST']))
 self.resource(member_name, collection_name, **kwargs)

def __resource_with_deleted ( self , member_name , collection_name , ** kwargs ) : collection_path = ( ( ( kwargs . get ( 'path_prefix' , '' ) + '/' ) + collection_name ) + '/deleted' ) member_path = ( collection_path + '/{id}' ) self . connect ( ( 'deleted_' + collection_name ) , collection_path , controller = collection_name , action = 'index' , deleted = True , conditions = dict ( method = [ 'GET' ] ) ) self . connect ( ( 'deleted_' + member_name ) , member_path , controller = collection_name , action = 'show' , deleted = True , conditions = dict ( method = [ 'GET' ] ) ) self . connect ( ( 'undelete_deleted_' + member_name ) , ( member_path + '/undelete' ) , controller = collection_name , action = 'undelete' , conditions = dict ( method = [ 'POST' ] ) ) self . resource ( member_name , collection_name , ** kwargs )
method to monkeypatch on to routes .