Skip to content

Commit

Permalink
Rewrite TasksController#big_fat_controller_method and TasksController…
Browse files Browse the repository at this point in the history
…#create_worklogs_for_tasks_create in TasksTemplateController to empty functions. Because templates don't need all this stuff.
  • Loading branch information
Anatoliy Lysenko committed Mar 8, 2010
1 parent 1e9e10e commit 43ef0e1
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/controllers/task_templates_controller.rb
Expand Up @@ -31,9 +31,18 @@ def update_work_log
raise Exception, CUSTOM_ERROR_MESSAGE
end
protected
#### This methods inherited from TasksController.
#### They modifies behavior of TasksController actions: new, create, edit, update etc.
#### Please see design pattern Template Method.
def current_company_task_new
task=Template.new
task.company=current_user.company
return task
end
def big_fat_controller_mehtod
#must be empty templates don't use all this stuff
end
def create_worklogs_for_tasks_create
#must be empty templates not have worklogs
end
end

0 comments on commit 43ef0e1

Please sign in to comment.