Sha256: 0deca9dd4e8b158d9757bfa461a80faa4abfa5306b070ed982d7d0dc84c2f3b9
Contents?: true
Size: 849 Bytes
Versions: 1
Compression:
Stored size: 849 Bytes
Contents
# conditional loading of activesupport if defined? Rails and Rails.version < '2.3.5' require 'activesupport' else require 'active_support/core_ext/class/inheritable_attributes' end # load the right csv library if RUBY_VERSION >= '1.9' require 'csv' FasterCSV = CSV else begin # try faster csv require 'fastercsv' rescue Error => e if defined? Rails Rails.logger.info "FasterCSV not installed, falling back on CSV" else puts "FasterCSV not installed, falling back on CSV" end require 'csv' FasterCSV = CSV end end require 'comma/extractors' require 'comma/generator' require 'comma/array' require 'comma/object' require 'comma/render_as_csv' if defined?(ActiveRecord) require 'comma/named_scope' end if defined?(ActionController) ActionController::Base.send :include, RenderAsCSV end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
comma-0.3.2 | lib/comma.rb |