summaryrefslogtreecommitdiff
path: root/app/serializers/entity_request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/serializers/entity_request.rb')
-rw-r--r--app/serializers/entity_request.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/serializers/entity_request.rb b/app/serializers/entity_request.rb
new file mode 100644
index 00000000000..456ba1174c0
--- /dev/null
+++ b/app/serializers/entity_request.rb
@@ -0,0 +1,12 @@
+class EntityRequest
+ # We use EntityRequest object to collect parameters and variables
+ # from the controller. Because options that are being passed to the entity
+ # do appear in each entity object in the chain, we need a way to pass data
+ # that is present in the controller (see #20045).
+ #
+ def initialize(parameters)
+ parameters.each do |key, value|
+ define_singleton_method(key) { value }
+ end
+ end
+end