lib/scrivito/attribute_content.rb in scrivito_sdk-0.71.2 vs lib/scrivito/attribute_content.rb in scrivito_sdk-0.90.0.rc1
- old
+ new
@@ -334,18 +334,19 @@
# @param [Symbol, String] type type of the attribute. Scrivito supports the following types:
# +string+, +stringlist+, +html+, +enum+, +multienum+, +widgetlist+, +reference+,
# +referencelist+, +link+, +linklist+, and +binary+.
# @param [Hash] options definition options.
#
- # @option options [Symbol, String] :values selectable values for +enum+ and +multienum+ attributes.
- # If no values are provided for attributes of these types, the resulting array of selectable
- # values is empty.
+ # @option options [Array<Symbol>, Array<String>] :values selectable values for +enum+ and
+ # +multienum+ attributes. If no values are provided for attributes of these types, the
+ # resulting array of selectable values is empty. Empty string is not allowed as value.
# @option options [Symbol, String] :default custom default value.
# See {Scrivito::AttributeContent::DEFAULT_ATTRIBUTE_VALUES} for factory defaults.
# See {Scrivito::AttributeContent::ClassMethods#default_for} for more advanced defaults.
#
# @return nil
# @raise [Scrivito::ScrivitoError] if the +type+ is unknown
+ # @raise [Scrivito::ScrivitoError] if the +values+ include an empty string
# @see Scrivito::AttributeContent::DEFAULT_ATTRIBUTE_VALUES
# @see Scrivito::AttributeContent::ClassMethods#default_for
#
# @example Defining attributes:
# class Page < ::Obj