Filter rails 3 comparibitily