lib/cloudxls-rails/handlers/xls.rb in cloudxls-rails-0.4.3 vs lib/cloudxls-rails/handlers/xls.rb in cloudxls-rails-0.5.0
- old
+ new
@@ -4,16 +4,15 @@
# CloudXLSRails::XLSResponder
module CloudXLSRails
class XLSResponder
def self.redirect!(controller, scope, options)
- columns = options.fetch(:columns, nil)
xdata = options[:data] || {}
unless (xdata.has_key?(:text) ||
xdata.has_key?(:url ) ||
xdata.has_key?(:file) )
- xdata[:text] = CloudXLS::CSVWriter.text(scope, {:columns => columns})
+ xdata[:text] = CloudXLS::CSVWriter.text(scope, options)
end
xopts = {:data => xdata}
xopts[:sheet] = options[:sheet] if options[:sheet]
xopts[:doc] = options[:doc] if options[:doc]