Skip to content

Freelancing Digest

Menu
  • Past Issues
  • Articles
  • About Me
    • Hire Me
    • Contact Me

Newsletter Launched

I’ve just created a newsletter that I’m going to use to use to announce my upcoming products and services at Little Stream Software.

Read more

  • marketing

Daily Refactor #18: Extract method in AuthSourceLdap

The Refactoring AuthSourceLdap#authenticate still can use some more refactoring. I performed another extract method, this time to create a method to authenticate an DN (Distinguished Name). Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 # app/models/auth_source_ldap.rb class AuthSourceLdap self.base_dn, :filter …

Read more

  • extract-method
  • redmine
  • refactoring
  • ruby

Daily Refactor #17: Extract method in AuthSourceLdap

Since I’ve been doing a lot of work on a Redmine plugin to add more LDAP features, I decided to use today to refactor some of Redmine’s LDAP code. The Refactoring I just performed a simple extract method refactoring on the authenticate method in AuthSourceLdap to make it easier to understand what it does with …

Read more

  • extract-method
  • redmine
  • refactoring
  • ruby

Daily Refactor #16: Rename method in RolesController

The Refactoring I’m continuing last Friday’s refactor today, but this time renaming the method in RolesController. Before 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 # app/controllers/roles_controller.rb class RolesController :post, :only => [ :destroy, :move ], :redirect_to => { :action => :list }   def index list …

Read more

  • redmine
  • refactoring
  • rename-method
  • ruby

Daily Refactor #15: Rename method in IssueStatusesController

It’s time to move on from the ReportsController to code that needs to be refactored more. Using Caliper’s Flay Report, it looks like IssueStatusesController, TrackersController, AuthSourcesController, and RolesController all have the exact same index action. 1 2 3 4 def index list render :action => 'list' unless request.xhr? end def index list render :action => …

Read more

  • redmine
  • refactoring
  • rename-method
  • ruby
Posts navigation
Newer posts
Older posts

About Eric | Twitter | Google Plus
Best of Eric Davis | Best of Freelancing | Best of Product Business | Best of Ruby and Rails Programming
Privacy Policy | Terms of Use | A Little Stream Software website

Want to transition from coder to consultant? Learn more: