Skip to content

Commit f45505e

Browse files
authored
Quizz (#66)
1 parent bbc85f0 commit f45505e

36 files changed

+900
-187
lines changed

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[submodule "rails6/code"]
22
path = rails6/code
3-
url = https://github.com/madeindjs/market_place_api_6.git
3+
url = git@github.com:madeindjs/market_place_api_6.git
44
[submodule "rails5/code"]
55
path = rails5/code
6-
url = https://github.com/madeindjs/market_place_api.git
6+
url = git@github.com:madeindjs/market_place_api.git

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ As you may know this project take me some times. So if you want to support me yo
2323
- Rails 6
2424
- [English version](https://leanpub.com/apionrails6/)
2525
- [French version](https://leanpub.com/apionrails6-fr)
26-
- [Spanish version](https://leanpub.com/apionrails6-es)
26+
- [Spanish version](https://leanpub.com/apionrails6-es) (thanks to [Oscar Téllez](https://github.com/oscartzgz))
2727

2828
Or you can support me with Liberapay: <noscript><a href="https://liberapay.com/alexandre_rousseau/donate"><img alt="Donate using Liberapay" src="https://liberapay.com/assets/widgets/donate.svg"></a></noscript>
2929

@@ -50,7 +50,3 @@ rake "build:pdf[version,lang]" # Build a PDF version
5050
## License
5151

5252
This book is under [MIT license](https://opensource.org/licenses/MIT) and [Creative Common BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/)
53-
54-
## Contributors
55-
56-
- [Oscar Téllez](https://github.com/oscartzgz) (spanish translation)

rails5/en/api_on_rails.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= API on Rails 5
22
Alexandre Rousseau <contact@rousseau-alexandre.fr>
3-
v6.12, 2020-12-20
3+
v6.20, 2021-03-25
44
:doctype: book
55
:toc:
66
:imagesdir: img
@@ -14,7 +14,7 @@ v6.12, 2020-12-20
1414
:author: Alexandre Rousseau
1515
:description: Learn best practice to build an API using Ruby on Rails 5
1616
:front-cover-image: image:cover.svg[]
17-
:revdate: 2020-12-20
17+
:revdate: 2021-03-25
1818

1919
include::chapter00-before.adoc[]
2020

rails5/en/chapter08-placing-orders.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ We can now add the implementation:
548548
class Order < ApplicationRecord
549549
# ...
550550
def set_total!
551-
self.total = products.map(&:price).sum
551+
self.total = products.sum :price
552552
end
553553
end
554554
----

rails5/en/chapter09-improve-orders.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ Currently in the `order` model we have this method to calculate the amount to pa
436436
class Order < ApplicationRecord
437437
# ...
438438
def set_total!
439-
self.total = products.map(&:price).sum
439+
self.total = products.sum :price
440440
end
441441
# ...
442442
end

rails5/en/chapter10-optimization.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ Finished in 0.92996 seconds (files took 0.95615 seconds to load)
863863
49 examples, 0 failures
864864
----
865865

866-
This would be a good time to _commit_ the changes and move on to the next section on caching.
866+
This would be a good time to commit the changes and move on to the next section on caching.
867867

868868
[source,bash]
869869
----

rails5/fr/api_on_rails.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= API on Rails 5
22
Alexandre Rousseau <contact@rousseau-alexandre.fr>
3-
v6.0.4, 2020-12-20
3+
v6.20, 2021-03-25
44
:doctype: book
55
:toc:
66
:imagesdir: img
@@ -14,7 +14,7 @@ v6.0.4, 2020-12-20
1414
:author: Alexandre Rousseau
1515
:description: Apprenez les meilleurs pratiques pour construire une API avec Ruby on Rails
1616
:front-cover-image: image:cover.svg[]
17-
:revdate: 2020-12-20
17+
:revdate: 2021-03-25
1818

1919
include::chapter00-before.adoc[]
2020

rails5/fr/chapter01-introduction.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ end
276276
# ...
277277
----
278278

279-
Ceci, comme vous vous en souvenez peut-être, empêchera l'installation ou l'utilisation de Sqlite lorsque vous déployez votre application chez un fournisseur de serveurs comme Herokufootnote:[Heroku facilite le déploiement de votre application en installant les dépendances sur un serveur en analysant votre _Gemfile_].
279+
Ceci, comme vous vous en souvenez peut-être, empêchera l'installation ou l'utilisation de Sqlite lorsque vous déployez votre application chez un fournisseur de serveurs comme Herokufootnote:[Heroku facilite le déploiement de votre application en installant les dépendances sur un serveur en analysant votre `Gemfile`].
280280

281281
Une fois cette configuration effectuée, il est temps d'exécuter la commande d'installation du paquet pour intégrer les dépendances correspondantes:
282282

rails5/fr/chapter08-placing-orders.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ Nous pouvons maintenant ajouter l'implémentation:
549549
class Order < ApplicationRecord
550550
# ...
551551
def set_total!
552-
self.total = products.map(&:price).sum
552+
self.total = products.sum :price
553553
end
554554
end
555555
----

rails5/fr/chapter09-improve-orders.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ Actuellement, dans le modèle de commande, nous avons cette méthode pour calcul
429429
class Order < ApplicationRecord
430430
# ...
431431
def set_total!
432-
self.total = products.map(&:price).sum
432+
self.total = products.sum :price
433433
end
434434
# ...
435435
end

0 commit comments

Comments
 (0)