Exception: Graphiti::Errors::MissingEnumAllowList
- Defined in:
- lib/graphiti/errors.rb
Instance Method Summary collapse
-
#initialize(resource_class, filter_name, enum_type) ⇒ MissingEnumAllowList
constructor
A new instance of MissingEnumAllowList.
- #message ⇒ Object
Constructor Details
#initialize(resource_class, filter_name, enum_type) ⇒ MissingEnumAllowList
Returns a new instance of MissingEnumAllowList.
186 187 188 189 190 |
# File 'lib/graphiti/errors.rb', line 186 def initialize(resource_class, filter_name, enum_type) @resource_class = resource_class @filter_name = filter_name @enum_type = enum_type end |
Instance Method Details
#message ⇒ Object
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 |
# File 'lib/graphiti/errors.rb', line 192 def " \#{@resource_class.name} You declared an attribute or filter of type \"\#{@enum_type}\" without providing a list of permitted values, which is required.\n\n When declaring an attribute:\n\n attribute :status, :\#{@enum_type}, allow: ['published', 'draft']\n\n When declaring a filter:\n\n filter :status, :\#{@enum_type}, allow: ['published', 'draft'] do\n # ...\n end\n MSG\nend\n" |