I finally felt comfortable enough to do the final conversion of WikiController to a REST resource. Yesterday’s refactoring of the :id parameter make this a lot easier. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 …
Category: Articles
Redmine Refactor #143: Convert WikiController to use :id params
This refactoring is a major change to how Redmine’s WikiController is routed. It’s been using the params[:page] field to track which page in the wiki is being requested but that won’t work with Rails’ resource routing, which uses params[:id]. Since I’ve already refactored Redmine so that params[:project_id] is used instead of params[:id], I am now …
Redmine Refactor #142: Convert WikiController#destroy to use HTTP DELETE
The code in WikiController is still a mess but I need to keep moving on in order to get it converted to a REST resource. Today I decided to convert the #destroy action to use HTTP DELETE. Before 1 2 class WikiController :post, :only => [:destroy, :protect], :redirect_to => { :action => :show } endclass …
Amy Hoy’s Launch Class 30 x 500
Amy Hoy is launching her newest class soon, called Launch Class 30×500. I was a member of her first one (Year of Hustle Launch Class) and I wanted to write up a short review of it. To keep it simple, I’m going to stick to bullet points: Was it worth the price? Yes. Even at …
Guest Post on RailsInside.com about Refactoring Rails using Flog
My second guest post to RailsInside.com, How To Score Your Rails App’s Complexity Before Refactoring was just posted. It includes how to use flog to find the complex code in your application.