set up rails to handle json, and create index template