Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rails6/en/chapter04-athentification.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ $ mkdir test/controllers/concerns
$ touch test/controllers/concerns/authenticable_test.rb
----

As usual, we start by writing our tests. In this case, our `current_user` method will search for an user by the authentication token in the HTTP header `Authorization`. The test is quite basic:
As usual, we start by writing our tests. In this case, our `current_user` method will search for a user by the authentication token in the HTTP header `Authorization`. The test is quite basic:

[source,ruby]
.test/controllers/concerns/authenticable_test.rb
Expand Down
2 changes: 1 addition & 1 deletion rails6/en/chapter06-improve-json.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[#chapter06-improve-json]
= Building JSON

In the previous chapter we added products to the application and built all the necessary routes. We have also associated a product with an user and restricted some of actions of `products_controller`.
In the previous chapter we added products to the application and built all the necessary routes. We have also associated a product with a user and restricted some of actions of `products_controller`.

Now you should be satisfied with all this work. But we still have a lot of work to do. Currently we have a JSON output that is not perfect. JSON output looks like this:

Expand Down
2 changes: 1 addition & 1 deletion rails6/en/chapter07-placing-orders.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $ git checkout -b chapter07

== Modeling order

If you remember associations model, `Order` model is associated with users and products at the same time. It is actually really simply to achieve this in Rails. The tricky part is when comes to serializing this objects. I'll talk more about this in a next section.
If you remember associations model, `Order` model is associated with users and products at the same time. Actually, It is really simple to achieve this in Rails. The tricky part is when it comes to serializing this object. I'll talk more about this in a next section.

Let’s start by creating the order model with a special form:

Expand Down
2 changes: 1 addition & 1 deletion rails6/en/chapter09-optimization.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ Now let's make a request with cURL. I remind you we must obtain an authenticatio
$ curl -X POST --data "user[email]=ockymarvin@jacobi.co" --data "user[password]=locadex1234" http://localhost:3000/api/v1/tokens
----

NOTE: "ockymarvin@jacobi.co" corresponds to an user created in my application with the _seed_. In your case, it will probably be different from mine since we used the Faker library.
NOTE: "ockymarvin@jacobi.co" corresponds to a user created in my application with the _seed_. In your case, it will probably be different from mine since we used the Faker library.

With the help of the token obtained, we can now make a request to access the products

Expand Down