Class: Hotwire::Response::Invalid
- Defined in:
- lib/hotwire/response/invalid.rb
Overview
Represents an invalid set of parameters. This is used only to guarantee a return value from the factory methods, even when parameters are wrong.
Invoking valid? on this class will sistematically return false.
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(request) ⇒ Invalid
constructor
A new instance of Invalid.
Methods inherited from Base
#add_column, #add_columns, #body, #set_data
Methods inherited from Base
#add_error, #valid?, #validate
Constructor Details
#initialize(request) ⇒ Invalid
Returns a new instance of Invalid.
8 9 10 11 12 13 |
# File 'lib/hotwire/response/invalid.rb', line 8 def initialize(request) super(request) add_error(:invalid_request, "Invalid output format: #{request[:out]}. " + "Valid ones are json,csv,html") end |