Mercurial > hg > soundsoftware-site
comparison 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 |
comparison
equal
deleted
inserted
replaced
22:40f7cfd4df19 | 37:94944d00e43c |
---|---|
60 | 60 |
61 def custom_field_values | 61 def custom_field_values |
62 @custom_field_values ||= available_custom_fields.collect { |x| custom_values.detect { |v| v.custom_field == x } || custom_values.build(:custom_field => x, :value => nil) } | 62 @custom_field_values ||= available_custom_fields.collect { |x| custom_values.detect { |v| v.custom_field == x } || custom_values.build(:custom_field => x, :value => nil) } |
63 end | 63 end |
64 | 64 |
65 def visible_custom_field_values | |
66 custom_field_values.select(&:visible?) | |
67 end | |
68 | |
65 def custom_field_values_changed? | 69 def custom_field_values_changed? |
66 @custom_field_values_changed == true | 70 @custom_field_values_changed == true |
67 end | 71 end |
68 | 72 |
69 def custom_value_for(c) | 73 def custom_value_for(c) |