I did this refactoring after yesterday’s but I wanted to do a separate post to clearly show how I got to the end result. The Refactoring The big duplication in #show_detail is in the case statement. Yesterday’s refactoring got it cleaned up enough so that seven cases where identical. So now refactoring the duplication is …
Tag: inline-method
Daily Refactor #13: Inline utility methods in ReportsController
The Refactoring Today I used the inline method refactoring to make the ReportsController even more concise by removing all of the utility methods. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 …