Skip to content

Commit 05d743b

Browse files
drnLeFnord
authored andcommitted
1 parent 4529077 commit 05d743b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ class ExampleEntity < Grape::Entity
220220
end
221221
```
222222

223-
You have always access to the presented instance with `object`
223+
You always have access to the presented instance (`object`) and the top-level
224+
entity options (`options`).
224225

225226
```ruby
226227
class ExampleEntity < Grape::Entity
@@ -229,7 +230,7 @@ class ExampleEntity < Grape::Entity
229230
private
230231

231232
def formatted_value
232-
"+ X #{object.value}"
233+
"+ X #{object.value} #{options[:y]}"
233234
end
234235
end
235236
```

0 commit comments

Comments
 (0)