Skip to content

Instantly share code, notes, and snippets.

@StaverDmitry
Created July 19, 2017 12:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StaverDmitry/67e02269c19b3e62caab9c3bffa6b5f7 to your computer and use it in GitHub Desktop.
Save StaverDmitry/67e02269c19b3e62caab9c3bffa6b5f7 to your computer and use it in GitHub Desktop.
def extras_total
@extras_total ||= extras.reject(&:_destroy).sum(&:amount)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment