Tag: refactoring

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 …

Read more

Redmine Refactor #91: Pull Up set_flash_from_bulk_issue_save to ApplicationController

This is the final refactoring I want to do on IssueMovesController for now. Using pull up method, I moved the last duplicated method from IssueMovesController to ApplicationController. Before 1 2 3 4 5 6 class IssuesController unsaved_issue_ids.size, :total => issues.size, :ids => '#' + unsaved_issue_ids.join(', #')) end end endclass IssuesController unsaved_issue_ids.size, :total => issues.size, :ids …

Read more