Tag: refactoring

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