Ruby on Rails - REST Single page application