add formatter method for rails-4