Tag: move-method

Redmine Refactor #121: Move Method from NewsController to PreviewsController

Now there is only one non-REST method inside of NewsController left. Today, using move method, I refactored #preview to move it to the dedicated PreviewsController. Before 1 2 3 4 5 6 7 8 9 10 11 class NewsController [:new, :create, :index, :preview] before_filter :find_project_from_association, :except => [:new, :create, :index, :preview] before_filter :find_project, :only => …

Read more

Redmine Refactor #106: Move method from ProjectsController#reset_activities to ProjectEnumerationsController#destroy

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 endclass ProjectsController 'projects', :action => 'settings', :tab => 'activities', :id => @project end end 1 …

Read more

Redmine Refactor #105: Move method from ProjectsController#save_activities to ProjectEnumerationsController#save

Redmine’s ProjectsController is starting to shed actions pretty quickly now. There are two more actions that should belong to a different controller though, #save_activities and #reset_activities. I’m starting on #save_activities today. These two actions affect a project’s Time Entry Activities, basically the “types” of time that is logged to Redmine (e.g. frontend development, testing, database …

Read more