Class: PgTagsOn::Repositories::ArrayValue::Delete
- Inherits:
-
Object
- Object
- PgTagsOn::Repositories::ArrayValue::Delete
- Includes:
- ActiveRecord::Arel
- Defined in:
- lib/pg_tags_on/repositories/array_value/delete.rb
Overview
This class is respnsible to delete tags stored as JSON objects.
Instance Method Summary collapse
Methods included from ActiveRecord::Arel
#arel_array_cat, #arel_array_remove, #arel_array_replace, #arel_bind, #arel_build_quoted, #arel_cast, #arel_distinct, #arel_function, #arel_infix_operation, #arel_jsonb_extract_path, #arel_query_attribute, #arel_sql, #arel_unnest
Instance Method Details
#call(repository:, relation:, tags:, returning: nil) ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/pg_tags_on/repositories/array_value/delete.rb', line 12 def call(repository:, relation:, tags:, returning: nil) @repository = repository @tags = repository.update_attributes relation: relation, attributes: { column_name => arel_function('array', ) }, returning: returning end |