btedev-comma 0.1.7 → 0.1.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/comma.rb +2 -1
  2. metadata +1 -1
@@ -43,7 +43,8 @@ if defined?(ActionController)
43
43
  module InstanceMethods
44
44
  def render_with_csv(options = nil, extra_options = {}, &block)
45
45
  return render_without_csv(options, extra_options, &block) unless (options.respond_to? '[]') and options[:csv]
46
- send_data Array(options[:csv]).to_comma(options[:style] ||= :default), :filename => "test.csv"
46
+ filename = options[:filename] || "report.csv"
47
+ send_data Array(options[:csv]).to_comma(options[:style] ||= :default), :filename => filename
47
48
  end
48
49
  end
49
50
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: btedev-comma
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barry Ezell