Skip to content

Commit 38c7ca3

Browse files
Merge pull request #264 from ddeaguiar/gh-pages
Corrected bug in second 'Context' example.
2 parents 21f6cd8 + a0273ae commit 38c7ca3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/execution-model.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,14 @@ value of the function is used as the new context value:
5151

5252
{% highlight clojure %}
5353
(defresource foo
54-
:service-available? {:a [1]}
55-
:exists? (fn [ctx] #(assoc ctx :a [2]))
54+
:service-available? {:entity [1]}
55+
:exists? (fn [ctx] #(assoc ctx :entity [2]))
5656
:handle-ok :entity)
5757
{% endhighlight %}
5858

5959
Without the wrapping in a function the updated context after
60-
```exists?``` would be ````{:a [1 2]}```` whereas in this case we get
61-
````{:a [1]}````.
60+
```exists?``` would be ````{:entity [1 2]}```` whereas in this case we get
61+
````{:entity [2]}````.
6262

6363
## Decision functions
6464

0 commit comments

Comments
 (0)