Redmine Refactor #114: Split Method in VersionsController

Just like in FilesController, I need to split a few methods in VersionsController before I can nest it under the projects resource.

Before

1
2
3
4
5
class VersionsController  'projects', :action => 'settings', :tab => 'versions', :id => @project
      end
    end
  end
end

After

1
2
3
4
5
6
class VersionsController  'projects', :action => 'settings', :tab => 'versions', :id => @project
      end
    end
  end
 
end

The #edit method wasn’t doing anything, so this refactoring was really simple. I did add some extra routing tests in the commit in order to make sure none of the urls changed.

Reference commit

About Eric Davis

I founded Little Stream Software where I help new entrepreneurs build a successful software business. I also created an ebook, Redmine Tips, where I show you how to become more productive using Redmine. I am also the author of Refactoring Redmine, where I go about refactoring Rails using Redmine as an example. Follow me on Twitter and Google Plus.

, , , ,

No comments yet.

Leave a Reply