place ugly code in Rails Track model