lib/rich/cms/content/item.rb in rich_cms-2.1.7 vs lib/rich/cms/content/item.rb in rich_cms-3.0.0

- old
+ new

@@ -1,6 +1,5 @@ - module Rich module Cms module Content class Item @@ -47,11 +46,11 @@ def to_tag(options = {}) attrs = [] default = @group.identifiers.size == 1 ? @object.send(@group.identifiers.first) : @object.attributes.values_at(*@group.identifiers).inspect value = @object.send(@group.value) - if Engine.can_render_metadata? + unless Auth.login_required? default = "< #{default} >" keys = @group.keys << @group.value.to_s data = @object.attributes.reject{|k, v| !keys.include?(k.to_s)} data[:editable_input_type] = options[:as] if %w(string text html).include? options[:as].to_s.downcase @@ -71,6 +70,6 @@ end end end -end +end \ No newline at end of file