Permalink
Browse files

only save the tasks if they have been loaded so we don't load tasks f…

…or no reason on each project save
  • Loading branch information...
1 parent fdbbeb4 commit 84993635389cb6022a0782727c2c05015007c112 @ryanb ryanb committed Jul 21, 2008
Showing with 4 additions and 2 deletions.
  1. +4 −2 app/models/project.rb
@@ -24,8 +24,10 @@ def existing_task_attributes=(task_attributes)
end
def save_tasks
- tasks.each do |task|
- task.save(false)
+ if tasks.loaded?
+ tasks.each do |task|
+ task.save(false)
+ end
end
end
end

0 comments on commit 8499363

Please sign in to comment.