Skip to content

Commit

Permalink
Fixed issue #272 - tags do not exist on tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
steveyken committed Aug 13, 2013
1 parent ee13a2f commit 19c9801
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/fat_free_crm/export_csv.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

module FatFreeCRM
class ExportCSV

# CSV export. Based on to_csv Rails plugin by Ary Djmal
# https://github.com/arydjmal/to_csv
#----------------------------------------------------------------------------
Expand All @@ -16,7 +16,7 @@ def self.from_array(items = [])
# Infer column types from the first item in the array
klass = items.first.class
columns = klass.columns.map(&:name).reject { |column| column =~ /password|token/ }
columns << 'tags'
columns << 'tags' if klass.taggable?
CSV.generate do |csv|
csv << columns.map { |column| klass.human_attribute_name(column) }
items.each do |item|
Expand All @@ -30,6 +30,6 @@ def self.from_array(items = [])
end
end
end

end
end

0 comments on commit 19c9801

Please sign in to comment.