Method: Spider::Model::Versioned::ClassMethods#version_contents
- Defined in:
- lib/spiderfw/model/mixins/versioned.rb
#version_contents ⇒ Object
Returns the elements that concur to define the objects version
197 198 199 200 201 202 203 204 205 |
# File 'lib/spiderfw/model/mixins/versioned.rb', line 197 def version_contents #no_content_assocs = [:choice, :multiple_choice] no_content_assocs = [] = self.storage.supports?(:embedding) self.elements_array.select{ |el| el.attributes[:version_content] || mapper.have_references?(el.name) || (!el.attributes[:added_reverse] && !no_content_assocs.include?(el.association)) }.reject{ |el| el.attributes[:version_content] == false || (el.model? && !(el.model < Spider::Model::Versioned)) } end |