mongoid-refile 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mongoid/refile.rb +2 -6
  3. metadata +15 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a145f5a3b6966e3583d2449043509eef357bc8c9
4
- data.tar.gz: acf461c1ed340297688b3ab5cd26c798afcd92c7
3
+ metadata.gz: cb7e94c97d123b4fbbaa0ad8b2c32ce2481012ec
4
+ data.tar.gz: a329d72d46829fc5f5986e3ee81a701b48889ecc
5
5
  SHA512:
6
- metadata.gz: 2527ada93649de6fa50f46f9d2d823d6fa1d0cc1f2043052c6330b6a5cb685de0f5efc9ad062d7419b1736234caf687b2a2152267508d24a8783135e2aa31c76
7
- data.tar.gz: 582907c4d274265487bbed17e8db609abbeb84f264afc0dc4fc1e66e607e43adcdb26b5b8576ee2273d7fd06c4d075b646e8c1fb2bcb357f07525e0295b1d80b
6
+ metadata.gz: 4489c79425df4c12f13885a237f4d35ee1aaddec74a620dc0162fe3d153603e108c35e3c62af12ba2146fa0fe4776ba99419fe1df0471c5bee54eb17811cc2d0
7
+ data.tar.gz: dac03440d93bf7cbb39c82f27acc9fa4be8cfbe45520c20d1237fc7cd40c2601fca89e34ffd185c38a34a4567f2270ded86d7cb81797d5f92b25133655f784e4
@@ -5,10 +5,10 @@ require 'mongoid'
5
5
  module Mongoid::Refile
6
6
  extend ActiveSupport::Concern
7
7
 
8
- class Attachment
8
+ included do
9
9
  extend Refile::Attachment
10
10
 
11
- def attachment(name, raise_errors: false, **_options)
11
+ def self.attachment(name, raise_errors: false, **_options)
12
12
  super
13
13
  attacher = "#{name}_attacher"
14
14
  field "#{name}_id".to_sym, type: String
@@ -31,8 +31,4 @@ module Mongoid::Refile
31
31
  end
32
32
  end
33
33
  end
34
-
35
- included do
36
- extend Attachment
37
- end
38
34
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-refile
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - aileron
@@ -78,6 +78,20 @@ dependencies:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
80
  version: '3.3'
81
+ - !ruby/object:Gem::Dependency
82
+ name: pry
83
+ requirement: !ruby/object:Gem::Requirement
84
+ requirements:
85
+ - - ">="
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
81
95
  - !ruby/object:Gem::Dependency
82
96
  name: mongoid-rspec
83
97
  requirement: !ruby/object:Gem::Requirement