Class: BatchApi::Operation::Rails
- Defined in:
- lib/batch_api/operation/rails.rb
Instance Attribute Summary
Attributes inherited from Rack
#app, #env, #headers, #method, #options, #params, #result, #url
Instance Method Summary collapse
-
#initialize(op, base_env, app) ⇒ Rails
constructor
Public: create a new Rails Operation.
-
#process_env ⇒ Object
Internal: customize the request environment.
Methods inherited from Rack
Constructor Details
#initialize(op, base_env, app) ⇒ Rails
Public: create a new Rails Operation. It does all that Rack does and also some additional Rails-specific processing.
9 10 11 12 |
# File 'lib/batch_api/operation/rails.rb', line 9 def initialize(op, base_env, app) super @params = params_with_path_components end |
Instance Method Details
#process_env ⇒ Object
Internal: customize the request environment. This is currently done manually and feels clunky and brittle, but is mostly likely fine, though there are one or two environment parameters not yet adjusted.
17 18 19 20 21 22 |
# File 'lib/batch_api/operation/rails.rb', line 17 def process_env # parameters super @env["action_dispatch.request.parameters"] = @params @env["action_dispatch.request.request_parameters"] = @params end |