JavaScript-based rendering in Rails