The Refactoring Today’s refactoring is just like yesterday’s but I wanted to show a quick tip with #create! I didn’t mention. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 class SourceVersion < ActiveRecord::Base include SecondDatabase set_table_name :versions def self.migrate all.each do |source_version| v = Version.new v.attributes …
Daily Refactor #69: Inline Temp in SourceNews#migrate
I wanted to start refactoring my Redmine merge plugin now. I’m getting it ready for a release so doing a few refactorings now will help me make sure it’s working properly. The Refactoring Using inline temp I was able to clean up how the SourceNews#migrate converts data from one database to the other database. Before …
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 …
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, …
SeeProjectRun is now Live
I’m so excited to say that SeeProjectRun is now live and open to the public. I’m going to try and blog about the more technical hurdles I’ve overcome here and keep the startup posts over on the SeeProjectRun Blog. If you’re a freelancer or run your own business, I’d appreciate if you signed up and …