Pages.js allow you to manage pages JS code and forget about low-level History API.
Andrey “A.I.” Sitnik
gem "pagesjs", "~> 0.0.2"