Class: Garner::Strategies::Context::Key::RequestPost
- Defined in:
- lib/garner/strategies/context/key/request_post.rb
Class Method Summary collapse
-
.apply(identity, ruby_context = self) ⇒ Garner::Cache::Identity
Injects the request POST parameters into the key hash.
- .field ⇒ Object
Class Method Details
.apply(identity, ruby_context = self) ⇒ Garner::Cache::Identity
Injects the request POST parameters into the key hash.
16 17 18 19 20 21 22 23 24 |
# File 'lib/garner/strategies/context/key/request_post.rb', line 16 def self.apply(identity, ruby_context = self) return identity unless (ruby_context.respond_to?(:request)) request = ruby_context.request if request.request_method == "POST" identity = identity.key(field => request.POST.dup) end identity end |
.field ⇒ Object
7 8 9 |
# File 'lib/garner/strategies/context/key/request_post.rb', line 7 def self.field :request_params end |