Exception: Jsonapi::QueryBuilder::Errors::UnpermittedSortParameters
- Inherits:
-
ArgumentError
- Object
- ArgumentError
- Jsonapi::QueryBuilder::Errors::UnpermittedSortParameters
- Defined in:
- lib/jsonapi/query_builder/errors/unpermitted_sort_parameters.rb
Instance Method Summary collapse
-
#initialize(unpermitted_parameters) ⇒ UnpermittedSortParameters
constructor
A new instance of UnpermittedSortParameters.
Constructor Details
#initialize(unpermitted_parameters) ⇒ UnpermittedSortParameters
Returns a new instance of UnpermittedSortParameters.
7 8 9 10 11 12 13 |
# File 'lib/jsonapi/query_builder/errors/unpermitted_sort_parameters.rb', line 7 def initialize(unpermitted_parameters) super [ unpermitted_parameters.to_sentence, unpermitted_parameters.count == 1 ? "is not a" : "are not", "permitted sort attribute".pluralize(unpermitted_parameters.count) ].join(" ") end |