Update weighting_controller.rb