Class: JsonApi::Parameters::Handlers::DefaultHandlers::ToManyRelationHandler
- Inherits:
-
BaseHandler
- Object
- BaseHandler
- JsonApi::Parameters::Handlers::DefaultHandlers::ToManyRelationHandler
- Includes:
- ActiveSupport::Inflector
- Defined in:
- lib/jsonapi_parameters/default_handlers/to_many_relation_handler.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#vals ⇒ Object
readonly
Returns the value of attribute vals.
-
#with_inclusion ⇒ Object
readonly
Returns the value of attribute with_inclusion.
Attributes inherited from BaseHandler
#included, #relationship_key, #relationship_value
Instance Method Summary collapse
Methods inherited from BaseHandler
call, #find_included_object, #initialize
Constructor Details
This class inherits a constructor from JsonApi::Parameters::Handlers::DefaultHandlers::BaseHandler
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
8 9 10 |
# File 'lib/jsonapi_parameters/default_handlers/to_many_relation_handler.rb', line 8 def key @key end |
#vals ⇒ Object (readonly)
Returns the value of attribute vals.
8 9 10 |
# File 'lib/jsonapi_parameters/default_handlers/to_many_relation_handler.rb', line 8 def vals @vals end |
#with_inclusion ⇒ Object (readonly)
Returns the value of attribute with_inclusion.
8 9 10 |
# File 'lib/jsonapi_parameters/default_handlers/to_many_relation_handler.rb', line 8 def with_inclusion @with_inclusion end |
Instance Method Details
#handle ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'lib/jsonapi_parameters/default_handlers/to_many_relation_handler.rb', line 10 def handle @with_inclusion = !relationship_value.empty? prepare_relationship_vals generate_key [key, vals] end |