mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 07:21:48 +01:00
Fasterer: Use &:symbol is faster
Calling argumentless methods within blocks is slower than using symbol to proc.
This commit is contained in:
parent
8a378aa2c4
commit
ddd9c07d3b
6 changed files with 51 additions and 51 deletions
|
|
@ -188,7 +188,7 @@ class Todo < ActiveRecord::Base
|
|||
|
||||
def touch_predecessors
|
||||
self.touch
|
||||
predecessors.each { |p| p.touch_predecessors }
|
||||
predecessors.each(&:touch_predecessors)
|
||||
end
|
||||
|
||||
def removed_predecessors
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue