Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Install mongoid.

  • Loading branch information...
commit c03f3796e1064874851bc58ce71bcfe1f66b489e 1 parent ab29669
@yalab authored
View
11 Gemfile.lock
@@ -35,6 +35,9 @@ GEM
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.2)
+ bson (1.6.1)
+ bson_ext (1.6.1)
+ bson (~> 1.6.1)
builder (3.0.0)
erubis (2.7.0)
hike (1.2.1)
@@ -49,6 +52,12 @@ GEM
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.18)
+ mongo (1.6.1)
+ bson (~> 1.6.1)
+ mongoid (2.4.7)
+ activemodel (~> 3.1)
+ mongo (~> 1.3)
+ tzinfo (~> 0.3.22)
multi_json (1.2.0)
polyglot (0.3.3)
rack (1.4.1)
@@ -92,6 +101,8 @@ PLATFORMS
ruby
DEPENDENCIES
+ bson_ext
csv_rails!
jquery-rails
+ mongoid
sqlite3
View
3  csv_rails.gemspec
@@ -19,5 +19,8 @@ Gem::Specification.new do |s|
s.add_dependency "rails", ">= 3.0.0"
s.add_development_dependency "sqlite3"
+ s.add_development_dependency "mongoid"
+ s.add_development_dependency "bson_ext"
+
s.licenses = ['MIT']
end
View
4 lib/csv_rails.rb
@@ -8,6 +8,10 @@
ActiveRecord::Relation.send(:include, CsvRails::ActiveModel::ClassMethods)
end
+if defined?(Mongoid)
+
+end
+
ActionController::Renderers.add :csv do |obj, options|
filename = options[:filename] || File.basename(request.path)
send_data obj.to_csv(options), :type => Mime::CSV,
View
6 test/csv_rails/mongoid_test.rb
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+require 'test_helper'
+
+class CsvRails::MongoidTest < ActiveSupport::TestCase
+
+end
View
1  test/dummy/config/application.rb
@@ -1,6 +1,7 @@
require File.expand_path('../boot', __FILE__)
require 'rails/all'
+require 'mongoid'
Bundler.require
require "csv_rails"
View
7 test/dummy/config/mongoid.yml
@@ -0,0 +1,7 @@
+development: &dev
+ host: localhost
+ database: csv_rails
+
+test:
+ <<: *dev
+
Please sign in to comment.
Something went wrong with that request. Please try again.