better version with simpler rails project and basic javascript