From 7212a995ab65eaa8b56d00fb2c01785f811a1bdb Mon Sep 17 00:00:00 2001 From: Augusts Bautra Date: Fri, 18 Jan 2019 13:13:27 +0200 Subject: [PATCH] Some style and typo fixes --- gems/cells/api.md | 2 +- gems/cells/getting-started.md | 2 +- gems/operation/2.0/contract.md | 2 +- gems/operation/2.0/representer.md | 2 +- guides/trailblazer/2.0/01-operation-basics.md | 2 +- guides/trailblazer/2.0/02-trailblazer-basics.md | 2 +- guides/trailblazer/2.0/03-rails-basics.md | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gems/cells/api.md b/gems/cells/api.md index f68e1c47..d9208c51 100644 --- a/gems/cells/api.md +++ b/gems/cells/api.md @@ -228,7 +228,7 @@ cell = cell(CommentCell, comment) ## File Structure -Having a cell to represent a fragment of your page is one thing. The real power, whatsoever, comes when rendering templates in cells. The `render` method does just that. +Having a cell to represent a fragment of your page is one thing. The real power, however, comes when rendering templates in cells. The `render` method does just that. In a suffix environment, Cells expects the following file layout. diff --git a/gems/cells/getting-started.md b/gems/cells/getting-started.md index 4045e974..c72e46ee 100644 --- a/gems/cells/getting-started.md +++ b/gems/cells/getting-started.md @@ -197,7 +197,7 @@ Let's quickly discuss what happens here in what order. After this section, you w 1. Invoking the cell in the layout via `Pro::Cell::Navigation.(nil, current_user: current_user).()` will instantiate the cell object and internally invoke the cell's default rendering method, named `show`. This method is automatically provided and simply renders the corresponding view. 2. Since the cell class name is `Pro::Cell::Navigation`, this cell will render the view `concepts/pro/view/navigation.haml`. This is following the Trailblazer naming style. -3. In the cell's view, two "helpers" are called: `signed_in?` and `avatar_url`. Whatsoever, the concept of a "helper" in Cells doesn't exist anymore. Any method or variable called in the view must be an *instance method* on the cell itself. This is why the cell class defines those two methods, and not some arbitrary helper module. +3. In the cell's view, two "helpers" are called: `signed_in?` and `avatar_url`. However, the concept of a "helper" in Cells doesn't exist anymore. Any method or variable called in the view must be an *instance method* on the cell itself. This is why the cell class defines those two methods, and not some arbitrary helper module. 4. Dependencies like the `current_user` have to get injected from the outer world when invoking the cell. Later, in the cell, those arguments can be accessed using the `options` cell method. It is important to understand that the cell has no access to global state. You as the cell author have to define the interface and the dependencies necessary to render the cell. diff --git a/gems/operation/2.0/contract.md b/gems/operation/2.0/contract.md index dd6d802d..88c23e6a 100644 --- a/gems/operation/2.0/contract.md +++ b/gems/operation/2.0/contract.md @@ -81,7 +81,7 @@ The `Build` macro accepts [the `:name` option](#name) to change the name from `d ## Validate -The `Contract::Validate` macro is responsible for validating the incoming params against its contract. That means you have to use `Contract::Build` beforehand, or create the contract yourself. The macro will then grab the params and throw then into the contract's `validate` (or `call`) method. +The `Contract::Validate` macro is responsible for validating the incoming params against its contract. That means you have to use `Contract::Build` beforehand, or create the contract yourself. The macro will then grab the params and throw them into the contract's `validate` (or `call`) method. {{ "contract_test.rb:validate-only:../trailblazer/test/docs:2-0" | tsnippet }} diff --git a/gems/operation/2.0/representer.md b/gems/operation/2.0/representer.md index 39382e18..4d109d98 100644 --- a/gems/operation/2.0/representer.md +++ b/gems/operation/2.0/representer.md @@ -155,7 +155,7 @@ The only real difference to the above examples is that Reform will validate itse [→ Reform's architecture docs](/gems/reform) talk about this in detail. -Reform infers this representer (or *deserializer*) automatically in `validate` and that is fine for most HTML forms where the contract schema and form layout are identical. In document APIs, whatsoever, the documents format often doesn't match 1-to-1 with the contract's schema. For example, when validating input in a JSON API system. +Reform infers this representer (or *deserializer*) automatically in `validate` and that is fine for most HTML forms where the contract schema and form layout are identical. In document APIs, however, the documents format often doesn't match 1-to-1 with the contract's schema. For example, when validating input in a JSON API system. This is where you can specify your own representer to be used against the contract. diff --git a/guides/trailblazer/2.0/01-operation-basics.md b/guides/trailblazer/2.0/01-operation-basics.md index fbedadab..6d7b42b5 100644 --- a/guides/trailblazer/2.0/01-operation-basics.md +++ b/guides/trailblazer/2.0/01-operation-basics.md @@ -239,7 +239,7 @@ The operation's pipe doesn't only allow you to skip steps, but also to handle er Handling an eventual error in `how_are_you?` now becomes nothing more than adding a step on the left track, after the erroring one. This works with `failure`. - And keep in mind, there can be any number of steps on each track. You can even jump back and fourth. + And keep in mind, there can be any number of steps on each track. You can even jump back and forth. {% endrow %} {% callout %} diff --git a/guides/trailblazer/2.0/02-trailblazer-basics.md b/guides/trailblazer/2.0/02-trailblazer-basics.md index 1297dc8c..4524ab08 100644 --- a/guides/trailblazer/2.0/02-trailblazer-basics.md +++ b/guides/trailblazer/2.0/02-trailblazer-basics.md @@ -287,7 +287,7 @@ Trailblazer tries to abstract the Reform or dry-validation internals from you, s ## Persist -When running our to-be-successful test case, whatsoever, it still breaks. +When running our to-be-successful test case, however, it still breaks. {{ "spec/concepts/blog_post/operation/create_spec.rb:validation-fail:../trailblazer-guides/:operation-02" | tsnippet }} diff --git a/guides/trailblazer/2.0/03-rails-basics.md b/guides/trailblazer/2.0/03-rails-basics.md index 6dd1c8cf..8222cfe7 100644 --- a/guides/trailblazer/2.0/03-rails-basics.md +++ b/guides/trailblazer/2.0/03-rails-basics.md @@ -103,7 +103,7 @@ The interesting part in the `Present` operation is the `:constant` option: it re {{ "app/concepts/blog_post/contract/create.rb:contract:../trailblazer-guides:operation-03" | tsnippet : "present" }} -Contracts can be pure `dry-validation` schemas or Reform objects that can in turn use `dry-validation` or `ActiveModel::Validations` as their validation engine. Using a Reform object, whatsoever, will allow rendering that form in a view. +Contracts can be pure `dry-validation` schemas or Reform objects that can in turn use `dry-validation` or `ActiveModel::Validations` as their validation engine. Using a Reform object, however, will allow rendering that form in a view. ## Contract Rendering