In today’s refactoring, I finished up refactoring ProjectsController to ProjectEnumerationsController. Using move method I moved #reset_activities to ProjectEnumerationsController and renamed it to #destroy.
Before
1
2
3
|
class ProjectsController 'projects', :action => 'settings', :tab => 'activities', :id => @project
end
end |
class ProjectsController 'projects', :action => 'settings', :tab => 'activities', :id => @project
end
end
1
2
|
class ProjectEnumerationsController < ApplicationController
end |
class ProjectEnumerationsController < ApplicationController
end
After
1
2
3
|
class ProjectsController < ApplicationController
# Removed reset_activities method
end |
class ProjectsController < ApplicationController
# Removed reset_activities method
end
1
2
3
|
class ProjectEnumerationsController 'projects', :action => 'settings', :tab => 'activities', :id => @project
end
end |
class ProjectEnumerationsController 'projects', :action => 'settings', :tab => 'activities', :id => @project
end
end
With this refactoring complete, ProjectsController is almost ready to be converted to a REST resource. There are three more methods that I think should be merged into other methods (#modules, #archive, and #unarchive) and then some more methods that should be split (#edit to #edit and #update).
Reference commit