<% html = render('table', collection: [resource]).match(/]*>(.*)<\/tbody>/m)[1].html_safe %> $wrap = $('#list'); $wrap.prepend('<%= j html %>'); $(document).trigger('admin:list_init'); $('#<%= dom_id(resource, 'list') %>').scrollToEl();