lib/rich/cms/content/item.rb in rich_cms-2.1.2 vs lib/rich/cms/content/item.rb in rich_cms-2.1.3

- old
+ new

@@ -62,10 +62,10 @@ attrs << options[:html].collect{|k, v| "#{k}=\"#{::ERB::Util.html_escape v}\""}.join(" ") if options[:html] attrs << data .collect{|k, v| "data-#{k}=\"#{::ERB::Util.html_escape v}\""}.join(" ") end - tag = options[:tag] || @group.tag || (%w(text html).include?(data.try :fetch, :editable_input_type, nil) ? :div : :span) + tag = options[:tag] || @group.tag || (%w(text html).include?(options[:as].to_s.downcase) ? :div : :span) "<#{tag} #{attrs.join(" ")}>#{value.blank? ? default : value}</#{tag}>".html_safe end end