Removed Node.js
Installed Rails 4 with Heroku tailored Gemfile
Removed Rails because app was generated with wrong version
Reinstalled Rails with version 4.0.8
Added database.yml with postgreSQL for production
Added Nap scaffold
Renamed conflicting type attribute into nap_type because Rails assumed it indicated inheritance
Added /api prefix for Naps, removed specific csrf code preventing API behaviour
Modified parameters check in Naps controller to enable standard POST and PUT requests