to_csv-rails 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/CHANGELOG +1 -1
  2. data/VERSION +1 -1
  3. data/lib/to_csv-rails.rb +2 -1
  4. metadata +1 -1
data/CHANGELOG CHANGED
@@ -4,5 +4,5 @@
4
4
  0.1.1
5
5
  update document
6
6
 
7
- 0.1.2
7
+ 0.1.3
8
8
  added custom header column names
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/lib/to_csv-rails.rb CHANGED
@@ -17,7 +17,8 @@ class Array
17
17
  data = []
18
18
  # header
19
19
  if options[:header]
20
- data << options[:header_columns].blank? ? columns.map(&:to_s).map(&:humanize).join(',') : options[:header_columns]
20
+ header_columns = options[:header_columns].blank? ? columns.map(&:to_s).map(&:humanize) : options[:header_columns]
21
+ data << header_columns.join(',')
21
22
  end
22
23
 
23
24
  self.each do |obj|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_csv-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: