mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 07:16:49 +00:00
commit
a52189c9c0
@ -266,7 +266,7 @@ In the controller, the scope/scope_name options are equal to
|
|||||||
the [`serialization_scope`method](https://github.com/rails-api/active_model_serializers/blob/d02cd30fe55a3ea85e1d351b6e039620903c1871/lib/action_controller/serialization.rb#L13-L20),
|
the [`serialization_scope`method](https://github.com/rails-api/active_model_serializers/blob/d02cd30fe55a3ea85e1d351b6e039620903c1871/lib/action_controller/serialization.rb#L13-L20),
|
||||||
which is `:current_user`, by default.
|
which is `:current_user`, by default.
|
||||||
|
|
||||||
Specfically, the `scope_name` is defaulted to `:current_user`, and may be set as
|
Specifically, the `scope_name` is defaulted to `:current_user`, and may be set as
|
||||||
`serialization_scope :view_context`. The `scope` is set to `send(scope_name)` when `scope_name` is
|
`serialization_scope :view_context`. The `scope` is set to `send(scope_name)` when `scope_name` is
|
||||||
present and the controller responds to `scope_name`.
|
present and the controller responds to `scope_name`.
|
||||||
|
|
||||||
|
|||||||
@ -43,7 +43,7 @@ class BenchmarkApp < Rails::Application
|
|||||||
config.secret_key_base = 'abc123'
|
config.secret_key_base = 'abc123'
|
||||||
config.consider_all_requests_local = false
|
config.consider_all_requests_local = false
|
||||||
|
|
||||||
# otherwise deadlock occured
|
# otherwise deadlock occurred
|
||||||
config.middleware.delete 'Rack::Lock'
|
config.middleware.delete 'Rack::Lock'
|
||||||
|
|
||||||
# to disable log files
|
# to disable log files
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user