Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor: Remove duplicated case statements.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3554 e93f8b46-1217-0410-a6f0-8f06a7374b81
- Loading branch information
Showing
1 changed file
with
6 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c07696b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blogged about at http://theadmin.org/articles/2010/03/09/inline-method-in-issues-helper-show_detail/
c07696b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This refactoring looks like a great code saver.
I have a short question, though. Why did you use include? on literal arrays? Shouldn't the following outline be functionally equal but more straight forward or am I missing the essence of this refactoring somehow?