Update existing RPINotes codebase to rails