mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +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
|
|
@ -130,7 +130,7 @@ class ContextsController < ApplicationController
|
|||
# actions in the context will also be deleted.
|
||||
def destroy
|
||||
# make sure the deleted recurrence patterns are removed from associated todos
|
||||
@context.recurring_todos.each { |rt| rt.clear_todos_association } unless @context.recurring_todos.nil?
|
||||
@context.recurring_todos.each(&:clear_todos_association) unless @context.recurring_todos.nil?
|
||||
|
||||
@context.destroy
|
||||
respond_to do |format|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue