Using extract class on the IssuesController, I was able to create another controller called ContextMenusController. This controller will handle Redmine’s right click context menu that is used on the issues list. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 …
Tag: extract-class
Redmine Refactor #94: Extract PreviewsController from IssuesController
Today I used extract class on IssuesController once again, this time to create PreviewsController. For the same reasons as yesterday, putting all of the preview actions together into a single controller will make things easier to maintain and might even give me some code reuse. Before 1 2 3 4 5 6 7 8 9 …
Redmine Refactor #93: Extract Controller from IssuesController
Continuing on the IssuesController refactoring, I used extract class to create a new controller for the #auto_complete action. This action is used to search for issues that match the text from a user. Redmine has several auto_complete actions scattered throughout different controllers that I’ve been wanting to unite into a single controller. Now AutoCompletesController can …
Redmine Refactor #89: Extract Controller: IssueMovesController
With #move and #perform_move separated in the IssuesController, I can now see a clear path to using extract controller to move them to a new controller. (Extract controller is a Rails specific refactoring that is based on extract class). Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 …
Daily Refactor #68: Extract Class to New Controller
The Refactoring Today I used extract class to move the #calendar method from IssuesController to it’s own controller. This is part of a large refactoring plan I have to get IssuesController slimmed down to a more manageable size. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …