Skip to content

Commit

Permalink
Fix set_total! method (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
tavofigse authored Jul 23, 2022
1 parent ef210f7 commit 8292fcf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion rails6/en/chapter07-placing-orders.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ We can now add the implementation:
class Order < ApplicationRecord
# ...
def set_total!
self.total = products.sum :price
self.total = self.products.map(&:price).sum
end
end
----
Expand Down
2 changes: 1 addition & 1 deletion rails6/es/chapter07-placing-orders.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ Ahora podemos añadir la implementación:
class Order < ApplicationRecord
# ...
def set_total!
self.total = products.sum :price
self.total = self.products.map(&:price).sum
end
end
----
Expand Down
2 changes: 1 addition & 1 deletion rails6/fr/chapter07-placing-orders.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ Nous pouvons maintenant ajouter l'implémentation:
class Order < ApplicationRecord
# ...
def set_total!
self.total = self.products.sum :price
self.total = self.products.map(&:price).sum
end
end
----
Expand Down

0 comments on commit 8292fcf

Please sign in to comment.