Fasterer: Use &:symbol is faster

Calling argumentless methods within blocks is slower than using
symbol to proc.
This commit is contained in:
Reinier Balt 2015-08-19 14:42:42 +02:00
parent 8a378aa2c4
commit ddd9c07d3b
6 changed files with 51 additions and 51 deletions

View file

@ -267,7 +267,7 @@ class ProjectsController < ApplicationController
end
def destroy
@project.recurring_todos.each {|rt| rt.remove_from_project!}
@project.recurring_todos.each(&:remove_from_project!)
@project.destroy
respond_to do |format|