Skip to content

Commit

Permalink
Remove nil values from array.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed Jun 25, 2010
1 parent 9f5a917 commit 1bd5e07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/user_segment/field_type.rb
Expand Up @@ -141,7 +141,7 @@ def self.field_output(mdl, handler_data, field)

data = handler_data[mdl.id]
if data.is_a?(Array)
value = data.collect { |d| d.send(display_field) }
value = data.collect { |d| d.send(display_field) }.delete_if { |v| v.nil? }

case info[:display_method]
when 'max'
Expand Down

0 comments on commit 1bd5e07

Please sign in to comment.