moved helper function to equipment_models_controller.rb