added formatter for compatibility with rails 4