app/helpers/scrivito_helper.rb in scrivito_sdk-0.70.2 vs app/helpers/scrivito_helper.rb in scrivito_sdk-0.71.0.rc1

- old
+ new

@@ -31,10 +31,14 @@ # 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. # @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. # @@ -61,11 +65,11 @@ # scrivito_tag(:ul, @obj, :body, {}, inner_tag: :li) # def scrivito_tag(tag_name, obj_or_widget, field_name, html_options = {}, editing_options = {}, &block) Scrivito::CmsFieldTag.new(self, tag_name, obj_or_widget, editing_options.merge( - widget_template_name: @scrivito_default_widget_template || :show, + widget_render_context: @scrivito_widget_render_context, field_name: field_name.to_s )).render(html_options, &block) end # @@ -194,10 +198,10 @@ when Scrivito::HtmlString Scrivito::CmsRouting.new(request, main_app, scrivito_engine).convert_links(value).html_safe when String then h(value) when Time then h(l(value)) when Scrivito::BasicWidget - render(template: value.to_show_view_path, locals: {widget: value}) + render(template: value.show_view_path, locals: {widget: value}) else value end end #