Update model.rb

values must first be converted before using to search