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
18 19 20 21 22 |
# File 'lib/avo/current.rb', line 18 def params request.params rescue {} end |
#request ⇒ Object
24 25 26 |
# File 'lib/avo/current.rb', line 24 def request view_context&.request || ActionDispatch::Request.empty end |