lib/scrivito/basic_obj.rb in scrivito_sdk-1.2.0 vs lib/scrivito/basic_obj.rb in scrivito_sdk-1.3.0.rc1
- old
+ new
@@ -399,11 +399,11 @@
# Destroys the {Scrivito::BasicObj Obj} in the current {Scrivito::Workspace}.
# @api public
def destroy
if children.any?
- raise ClientError.new(I18n.t('scrivito.errors.models.basic_obj.has_children'), 412)
+ raise ClientError.new(I18n.t('scrivito.errors.models.basic_obj.has_children'))
end
workspace.api_request(:delete, "/objs/#{id}")
end
def to_param
@@ -1052,11 +1052,11 @@
widget.obj = self
end
end
def as_date(value)
- DateAttribute.deserialize_from_backend(value) unless value.nil?
+ DateConversion.deserialize_from_backend(value) unless value.nil?
end
def find_blob
read_attribute('blob')
end
@@ -1132,10 +1132,10 @@
end
def value_of_system_attribute(attribute_name)
attribute_value = data_from_cms.value_of(attribute_name)
if attribute_name == '_last_changed'
- DateAttribute.deserialize_from_backend(attribute_value)
+ DateConversion.deserialize_from_backend(attribute_value)
else
attribute_value
end
end