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



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

def append_action_schema
  UpdateData::Schemas::APPEND_ACTION
end

#functional_update_schemaObject



287
288
289
# File 'lib/view_model/active_record/update_data.rb', line 287

def functional_update_schema
  UpdateData::Schemas::COLLECTION_UPDATE
end

#functional_update_typeObject



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

def functional_update_type
  Functional
end

#parse_contents(values) ⇒ Object



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

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

#remove_action_schemaObject



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

def remove_action_schema
  UpdateData::Schemas::REMOVE_ACTION
end

#replace_update_typeObject



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

def replace_update_type
  Replace
end

#update_action_schemaObject



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

def update_action_schema
  UpdateData::Schemas::UPDATE_ACTION
end