Method: ActiveVersioning::VersionManager#ensure_compatibility_with
- Defined in:
- lib/active_versioning/version_manager.rb
#ensure_compatibility_with(version) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/active_versioning/version_manager.rb', line 19 def ensure_compatibility_with(version) incompatible_attributes(version).tap do |incompatible_attrs| if incompatible_attrs.any? raise Errors::IncompatibleVersion.new(record, version), "The given version contains attributes that are no longer compatible with the current schema: #{incompatible_attrs.to_sentence}." end end end |