Conductor is a Rails engine that lets you do through a web UI what you'd normally do with the rails shell command.
function loadMore(pageNo) {
$("#loading").html('Loading...').show();
var url = '/foo/';
$.get(url, {pageNo: pageNo}, function(response) {
$("#results").append(response);
$("#loading").hide();
});
}
$(document).ready(function() {
var currPage = 1;
$("a.next").click(function() {
loadMore(++currPage);
});
});
<a class="next">More results</a>