match compate issue with rails 4