lib/builders/html_builder.rb in navigasmic-0.5.1 vs lib/builders/html_builder.rb in navigasmic-0.5.2
- old
+ new
@@ -32,10 +32,10 @@
buffer = template.capture(self, &proc)
group = template.content_tag(@@group_tag, buffer)
label = label_for_group(label) unless label.blank?
- visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? options[:hidden_unless].call : options[:hidden_unless]
+ visible = options[:hidden_unless].nil? ? true : options[:hidden_unless].is_a?(Proc) ? template.instance_eval(&options[:hidden_unless]) : options[:hidden_unless]
visible ? template.content_tag(@@item_tag, label.to_s + group, options.delete(:html)) : ''
end
def item(label, options = {}, &proc)
buffer = block_given? ? template.capture(self, &proc) : ''
\ No newline at end of file