Class: RESTFramework::Config
- Inherits:
-
Object
- Object
- RESTFramework::Config
- Defined in:
- lib/rest_framework.rb
Overview
Global configuration should be kept minimal, as controller-level configurations allows multiple APIs to be defined to behave differently.
Instance Attribute Summary collapse
-
#disable_auto_finalize ⇒ Object
Do not run ‘rrf_finalize` on controllers automatically using a `TracePoint` hook.
-
#freeze_config ⇒ Object
Freeze configuration attributes during finalization to prevent accidental mutation.
Instance Attribute Details
#disable_auto_finalize ⇒ Object
Do not run ‘rrf_finalize` on controllers automatically using a `TracePoint` hook. This is a performance option and must be global because we have to determine this before any controller-specific configuration is set. If this is set to `true`, then you must manually call `rrf_finalize` after any configuration on each controller that needs to participate in:
- Model delegation, for the helper methods to be defined dynamically.
- Websockets, for `::Channel` class to be defined dynamically.
- Controller configuration finalization.
28 29 30 |
# File 'lib/rest_framework.rb', line 28 def disable_auto_finalize @disable_auto_finalize end |
#freeze_config ⇒ Object
Freeze configuration attributes during finalization to prevent accidental mutation.
31 32 33 |
# File 'lib/rest_framework.rb', line 31 def freeze_config @freeze_config end |