lib/table_cloth/column.rb in table_cloth-0.3.0.beta3 vs lib/table_cloth/column.rb in table_cloth-0.3.1.alpha1
- old
+ new
@@ -13,10 +13,14 @@
else
object.send(name)
end
end
- def human_name
- options[:label] || name.to_s.humanize
+ def human_name(view)
+ if options[:label].kind_of? Proc
+ view.instance_exec(&options[:label])
+ else
+ options[:label] || name.to_s.humanize
+ end
end
end
end
\ No newline at end of file