lib/scrivito/attribute_content.rb in scrivito_sdk-1.8.1 vs lib/scrivito/attribute_content.rb in scrivito_sdk-1.9.0.rc1
- old
+ new
@@ -2,11 +2,11 @@
# This class is for handling attributes: setting and accessing their values, providing
# default values, restricting the types of widgets that may be added to a +widgetlist+
# attribute, plus a couple of convenience methods.
# @api public
-# @see http://scrivito.com/attribute-types Attributes and their type
+# @see https://scrivito.com/attribute-types Attributes and their type
#
module AttributeContent
ATTRIBUTE_TYPES = %w[
binary
date
@@ -126,11 +126,12 @@
# Their order is preserved as they are offered to the user via the widget browser.
#
# @api public
# @param [String] field_name Name of the widget attribute.
# @return [nil, Array<Class>]
- # @see http://scrivito.com/limiting-widget-and-page-types Limiting available widget and page types
+ # @see
+ # https://scrivito.com/limiting-widget-and-page-types Limiting available widget and page types
#
def valid_widget_classes_for(field_name)
end
def valid_widget_ruby_classes_for(field)
@@ -449,11 +450,11 @@
# #=> [Image]
#
# ImageWidget.attribute_definitions[:my_reference2].valid_classes
# #=> [Image, Video]
#
- # @see http://scrivito.com/default-attribute-values Specifying default attribute values
+ # @see https://scrivito.com/default-attribute-values Specifying default attribute values
#
def attribute(name, type, options = {})
name, type, options = name.to_s, type.to_s, options
assert_valid_attribute_name(name)
assert_valid_attribute_type(type)
@@ -560,10 +561,10 @@
# bob.preferences[:locale] # => 'de'
#
# my_page = MyPage.create({_path: '/en/test'}, bob)
# my_page.title # => 'Hier den Titel eingeben'
#
- # @see http://scrivito.com/default-attribute-values Specifying default attribute values
+ # @see https://scrivito.com/default-attribute-values Specifying default attribute values
#
def default_for(attribute_name, &block)
attribute_name = attribute_name.to_s
raise ScrivitoError, 'No block given' unless block_given?
attribute_defaults[attribute_name] = block