Tag: pull-up-method

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

Daily Refactor #67: Pull Up Method to ApplicationController

The Refactoring After a two hour Developer Meeting for Redmine this morning, I’m too drained to tackle the entire refactoring for #find_optional_project. I did use pull up method to remove the duplication in the GanttsController and IssuesController though. Before 1 2 3 4 5 6 7 # app/controllers/issues_controller.rb class IssuesController params[:controller], :action => params[:action]}, @project, …

Read more

Daily Refactor #66: Pull Up Method to ApplicationController

The Refactoring Today I cleaned up one of the duplications from yesterday’s refactoring, using pull up method. Before 1 2 3 4 5 6 7 8 9 # app/controllers/issues_controller.rb class IssuesController < ApplicationController def query_statement_invalid(exception) logger.error "Query::StatementInvalid: #{exception.message}" if logger session.delete(:query) sort_clear render_error "An error occurred while executing the query and has been logged. Please …

Read more