Class: Avo::Current
- Inherits:
-
ActiveSupport::CurrentAttributes
- Object
- ActiveSupport::CurrentAttributes
- Avo::Current
- Defined in:
- lib/avo/current.rb
Instance Method Summary collapse
-
#params ⇒ Object
Protect from error #<RuntimeError: Missing rack.input> when request is ActionDispatch::Request.empty.
- #request ⇒ Object
Instance Method Details
#params ⇒ Object
Protect from error #<RuntimeError: Missing rack.input> when request is ActionDispatch::Request.empty
30 31 32 33 34 |
# File 'lib/avo/current.rb', line 30 def params request.params rescue {} end |
#request ⇒ Object
36 37 38 |
# File 'lib/avo/current.rb', line 36 def request view_context&.request || ActionDispatch::Request.empty end |