Class: Shaf::Parser::FormData
Instance Attribute Summary
Attributes inherited from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Base
inherited, #initialize, mime_type
Constructor Details
This class inherits a constructor from Shaf::Parser::Base
Class Method Details
.can_handle?(request) ⇒ Boolean
4 5 6 |
# File 'lib/shaf/parser/form_data.rb', line 4 def self.can_handle?(request) request.form_data? || request.parseable_data? end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 |
# File 'lib/shaf/parser/form_data.rb', line 8 def call request.POST.tap do |data| # Returns form params from Rack::Request data.delete '_method' # If the method override hack is used remove the _method key end end |