Class: ViewModel::ActiveRecord::OwnedCollectionUpdate::Parser

Inherits:
AbstractCollectionUpdate::Parser show all
Defined in:
lib/view_model/active_record/update_data.rb

Instance Method Summary collapse

Methods inherited from AbstractCollectionUpdate::Parser

#initialize, #parse

Constructor Details

This class inherits a constructor from ViewModel::ActiveRecord::AbstractCollectionUpdate::Parser

Instance Method Details

#append_action_schemaObject



295
296
297
# File 'lib/view_model/active_record/update_data.rb', line 295

def append_action_schema
  UpdateData::Schemas::APPEND_ACTION
end

#functional_update_schemaObject



291
292
293
# File 'lib/view_model/active_record/update_data.rb', line 291

def functional_update_schema
  UpdateData::Schemas::COLLECTION_UPDATE
end

#functional_update_typeObject



317
318
319
# File 'lib/view_model/active_record/update_data.rb', line 317

def functional_update_type
  Functional
end

#parse_contents(values) ⇒ Object



307
308
309
310
311
# File 'lib/view_model/active_record/update_data.rb', line 307

def parse_contents(values)
  values.map do |value|
    UpdateData.parse_associated(association_data, blame_reference, valid_reference_keys, value)
  end
end

#remove_action_schemaObject



299
300
301
# File 'lib/view_model/active_record/update_data.rb', line 299

def remove_action_schema
  UpdateData::Schemas::REMOVE_ACTION
end

#replace_update_typeObject



313
314
315
# File 'lib/view_model/active_record/update_data.rb', line 313

def replace_update_type
  Replace
end

#update_action_schemaObject



303
304
305
# File 'lib/view_model/active_record/update_data.rb', line 303

def update_action_schema
  UpdateData::Schemas::UPDATE_ACTION
end