diff vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb @ 37:94944d00e43c

* Update to SVN trunk rev 4411
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 19 Nov 2010 13:24:41 +0000
parents 513646585e45
children af80e5618e9b
line wrap: on
line diff
--- a/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb	Fri Sep 24 14:06:04 2010 +0100
+++ b/vendor/plugins/acts_as_customizable/lib/acts_as_customizable.rb	Fri Nov 19 13:24:41 2010 +0000
@@ -62,6 +62,10 @@
           @custom_field_values ||= available_custom_fields.collect { |x| custom_values.detect { |v| v.custom_field == x } || custom_values.build(:custom_field => x, :value => nil) }
         end
         
+        def visible_custom_field_values
+          custom_field_values.select(&:visible?)
+        end
+        
         def custom_field_values_changed?
           @custom_field_values_changed == true
         end