@@ -72,7 +72,7 @@ gem 'props_template'
7272and run ` bundle ` .
7373
7474Optionally add the [ core ext] ( #array-core-extension ) to an initializer if you
75- want to [ dig] ( #traversing ) into your templates.
75+ want to [ dig] ( #digging ) into your templates.
7676
7777``` ruby
7878require ' props_template/core_ext'
@@ -152,7 +152,7 @@ The difference between the block form and inline form is
152152 1 . The block form is an internal node. Functionality such as Partials,
153153 Deferment and other [ options] ( #options ) are only available on the
154154 block form.
155- 2 . The inline form is considered a leaf node, and you can only [ search ] ( #traversing )
155+ 2 . The inline form is considered a leaf node, and you can only [ dig ] ( #digging )
156156 for internal nodes.
157157
158158### json.extract!
202202| collection | A collection that responds to ` member_at ` and ` member_by ` |
203203| options | Additional [ options] ( #options ) |
204204
205- To support [ traversing nodes ] ( #traversing ) , any list passed
205+ To support [ digging ] ( #digging ) , any list passed
206206to ` array! ` MUST implement ` member_at(index) ` and ` member_by(attr, value) ` .
207207
208208For example, if you were using a delegate:
276276```
277277
278278PropsTemplate does not know what the elements are in your collection. The
279- example above will be fine for [ traversing ] ( #traversing )
279+ example above will be fine for [ digging ] ( #digging )
280280by index, but will raise a ` NotImplementedError ` if you query by attribute. You
281281may still need to implement ` member_by ` .
282282
@@ -447,7 +447,7 @@ entirely and replace the value with a placeholder. A common use case would be
447447tabbed content that does not load until you click the tab.
448448
449449When your client receives the payload, you may issue a second request to the
450- same endpoint to fetch any missing nodes. See [ traversing nodes ] ( #traversing )
450+ same endpoint to fetch any missing nodes. See [ digging ] ( #digging )
451451
452452There is also an ` defer: :auto ` option that you can use with [ SuperglueJS] [ 1 ] . [ SuperglueJS] [ 1 ]
453453will use the metadata from ` json.deferred! ` to issue a ` remote ` dispatch to fetch
@@ -502,7 +502,7 @@ your collection item, and is used for `defer: :auto` to generate a keypath for
502502[ SuperglueJS] [ 1 ] . If you are NOT using SuperglueJS, you do not need to do this.
503503
5045042 . Implement ` member_at ` , on the [ collection] ( #jsonarray ) . This will be called
505- by PropsTemplate to when [ searching nodes ] ( #traversing )
505+ by PropsTemplate to when [ digging ] ( #digging )
506506
507507For example:
508508
528528If you are using [ SuperglueJS] [ 1 ] , SuperglueJS will, it will automatically kick off
529529` remote(?props_at=posts.some_id=1.contact) ` and ` remote(?props_at=posts.some_id=2.contact) ` .
530530
531- ## Traversing
531+ ## Digging
532532
533533PropsTemplate has the ability to walk the tree you build, skipping execution of
534534untargeted nodes. This feature is useful for selectively updating your frontend
@@ -537,7 +537,7 @@ state.
537537``` ruby
538538traversal_path = [' data' , ' details' , ' personal' ]
539539
540- json.data(search : traversal_path) do
540+ json.data(dig : traversal_path) do
541541 json.details do
542542 json.employment do
543543 ...more stuff
@@ -571,13 +571,13 @@ The above will output:
571571}
572572```
573573
574- Searching only works with blocks, and will NOT work with Scalars
574+ Digging only works with blocks, and will NOT work with Scalars
575575("leaf" values). For example:
576576
577577``` ruby
578578traversal_path = [' data' , ' details' , ' personal' , ' name' ] < - not found
579579
580- json.data(search : traversal_path) do
580+ json.data(dig : traversal_path) do
581581 json.details do
582582 json.personal do
583583 json.name ' james'
@@ -588,12 +588,12 @@ end
588588
589589## Nodes that do not exist
590590
591- Nodes that are not found will remove the branch where search was enabled on.
591+ Nodes that are not found will remove the branch where digging was enabled on.
592592
593593``` ruby
594594traversal_path = [' data' , ' details' , ' does_not_exist' ]
595595
596- json.data(search : traversal_path) do
596+ json.data(dig : traversal_path) do
597597 json.details do
598598 json.personal do
599599 json.name ' james'
@@ -642,7 +642,7 @@ will render Layout first, then the template when `yield json` is used.
642642
643643## Change key format
644644By default, keys are not formatted. This is intentional. By being explicity with your keys,
645- it makes your views quicker and more easily searchable when working in Javascript land.
645+ it makes your views quicker and more easily diggable when working in Javascript land.
646646
647647If you must change this behavior, override it in an initializer and cache the value:
648648
0 commit comments