You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rails6/en/chapter06-improve-json.adoc
+12-22Lines changed: 12 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ The content of the `data` key is also quite strict:
58
58
* properties of the objects must be placed in an `attributes` key
59
59
* links of the objects must be placed in a `relationships` key
60
60
61
-
In this chapter we will customize the JSON output using Netflix's gem: https://github.com/Netflix/fast_jsonapi_jsonapi[fast_jsonapi]. Luckily for use they already implements all https://jsonapi.org/[JSON:API] specifications.
61
+
In this chapter we will customize the JSON output using Netflix's gem: https://github.com/Netflix/fast_jsonapi[fast_jsonapi]. Luckily for use they already implements all https://jsonapi.org/[JSON:API] specifications.
62
62
63
63
So let's install the gem `fast_jsonapi`:
64
64
@@ -202,7 +202,7 @@ end
202
202
There you go. It's no more complicated than that. Let's change our controller a little bit.
In this last section we will continue to strengthen the `Products#index` action by setting up a very simple search mechanism allowing any customer to filter the results. This section is optional as it will have no impact on the application modules. But if you want to practice more with the TDD I recommend that you to complete this last step.
696
686
697
-
I use https://github.com/activerecord-hackery/ransack[Ransack] or https://github.com/casecommons/pg_search_search[pg_search] to build advanced search forms extremely quickly. But since the goal is learning and searching we are going to do is very simple. I think we can build a search engine from scratch. We simply have to consider the criteria by which we will filter the attributes. Hang on to your seats it's going to be a tough trip.
687
+
I use https://github.com/activerecord-hackery/ransack[Ransack] or https://github.com/casecommons/pg_search[pg_search] to build advanced search forms extremely quickly. But since the goal is learning and searching we are going to do is very simple. I think we can build a search engine from scratch. We simply have to consider the criteria by which we will filter the attributes. Hang on to your seats it's going to be a tough trip.
698
688
699
689
We will therefore filter the products according to the following criteria:
700
690
@@ -741,11 +731,11 @@ And now we can build some tests:
0 commit comments