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
end
1
2
3
4
5
6
class IssueMovesController  unsaved_issue_ids.size,
                        :total => issues.size,
                        :ids => '#' + unsaved_issue_ids.join(', #'))
    end
  end
end
1
2
3
class ApplicationController < ActionController::Base
  # ...
end

After

1
2
3
class IssuesController < ApplicationController
  # ...
end
1
2
3
class IssueMovesController < ApplicationController
  # ...
end
1
2
3
4
5
6
class ApplicationController  unsaved_issue_ids.size,
                        :total => issues.size,
                        :ids => '#' + unsaved_issue_ids.join(', #'))
    end
  end
end

Now that IssueMovesController is done, I can go back to IssuesController and work on the next set of refactorings. It’s finally starting to really shrink, there are only 14 public actions left which should only take a few more weeks to resolve.

  1. index
  2. changes
  3. show
  4. new
  5. create
  6. edit
  7. update
  8. reply
  9. bulk_edit
  10. destroy
  11. context_menu
  12. update_form
  13. preview
  14. auto_complete

Reference commit