app/helpers/scrivito_helper.rb in scrivito_sdk-0.71.2 vs app/helpers/scrivito_helper.rb in scrivito_sdk-0.90.0.rc1

- old
+ new

@@ -29,16 +29,19 @@ # the widgets are rendered within block tags. # @param obj_or_widget [Scrivito::BasicObj, Scrivito::BasicWidget] A {Scrivito::BasicObj} # or {Scrivito::BasicWidget} from which the +field_name+ is read. # @param field_name [String, Symbol] Which field of the Obj should be rendered. # @param html_options [Hash] HTML options to be passed to +content_tag+. + # # @param editing_options [Hash] Additional editing options for widgets (e.g. +:inner_tag+) # @option editing_options [Symbol] :inner_tag Wraps widgets inside specified tag # @option editing_options [String, Symbol] :editor Name of the JavaScript editor to be used for # this field. Normally, the name of the editor to be used for a field is determined by the # +scrivito.select_editor+ JavaScript API. The option +:editor+ should only be used if setting - # the editor via the JavaScript API is not feasible. + # the editor via the JavaScript API is not feasible. Specifying +editor: false+ disables + # in-place editing. + # # @param block [Proc] Optional block to render inner HTML. If none given the value of attribute # will be rendered instead. +block+ is not allowed for fields of type +widget+. # # @raise ArgumentError if the field behind +field_name+ is of type +widget+ and a +block+ is given. # @@ -299,10 +302,10 @@ content_tag(:div, class: 'scrivito_content_group') do capture do if title concat content_tag(:h3, title) end - yield + concat capture(&block) end end end # @!group Details Dialog Size