Update app/assets/javascripts/newplan.js app/controllers/newplan_controller.rb
Fix code (Refactoring)