surrounded-rails 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7a28e1ccee3cef0388c7a82070111665810f079a
4
- data.tar.gz: 32f47410e6ff0f091b8063f849e3494dad822758
3
+ metadata.gz: 1771ec1d18ff450f5c270c7da2c8721ef312ed54
4
+ data.tar.gz: 804fe021d6c6b36752ed25032f60902f8a8e0415
5
5
  SHA512:
6
- metadata.gz: 081b1daa40b863eaf72eadbc7ae29a1da2e1b743990feedba8ccb45b8291527b922a5309a8fdc5709d49cdab7af00ec0c43c161abbeffa6bafa319148e18afe4
7
- data.tar.gz: af20f580c52d2c32626dc9aabeede1090e5a79502d746fbd5635a01c6799458fc727d2cbd85c87726403a24a8409b01902b2413af8295fbf68d37182be3c9f32
6
+ metadata.gz: 2b07f1373ab9f6933193ae1bbc8f660f881a12918d3b6ee976748dd2a8f19677abbebc8f322c27e50623166f970a53aaea7210a9868037592a2c723e55f60fcb
7
+ data.tar.gz: 070380e44e4aa169b684fe443f8bb34fcad5d60614063af648142f3394ea5cfd1480f55356b639b55abb9268c94d4f208d0301647f80cb043fc31fbd9e283839
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Surrounded::Rails
2
2
 
3
- This sets up your ActiveRecord models and ActionController controllers to use [Surrounded](http://github.com/saturnflyer/surrounded).
3
+ This sets up your ActiveRecord and/or Mongoid models and ActionController controllers to use [Surrounded](http://github.com/saturnflyer/surrounded).
4
4
  Support for non-ActiveRecord will be added.
5
5
 
6
6
  ## Installation
@@ -1,5 +1,5 @@
1
1
  module Surrounded
2
2
  module Rails
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
@@ -3,8 +3,16 @@ require "surrounded"
3
3
  require "rails"
4
4
  module Surrounded
5
5
  class Railtie < ::Rails::Railtie
6
- initializer 'surrounded.active_record' do |app|
7
- ActiveRecord::Base.send(:include, Surrounded)
6
+ if defined?(ActiveRecord)
7
+ initializer 'surrounded.active_record' do |app|
8
+ ActiveRecord::Base.send(:include, Surrounded)
9
+ end
10
+ end
11
+
12
+ if defined?(Mongoid)
13
+ initializer 'surrounded.mongoid' do |app|
14
+ Mongoid::Document.send(:include, Surrounded)
15
+ end
8
16
  end
9
17
 
10
18
  initializer 'surrounded.action_controller' do |app|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: surrounded-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "'Jim Gay'"