update to use in rails 4