reduced duplication in format_for_views method
Merge pull request #46 from edatrix/code-climate-refactor

reduced duplication in format_for_views method