rails_dictionary 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/rails_dictionary/acts_as_dictionary.rb +3 -3
- data/lib/rails_dictionary/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aa45031164009565fcb220ccce7c96a6482cfb81d8b41225b4008e06d5ea95c9
|
4
|
+
data.tar.gz: 912b98be0d156d8253aa46fad087c387d648afb81e83eb08bf959d007cb96dfc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac1649c7b55cdc093791d6160210e1d09a4d78a5a1a6c44c75722ae4023e42f2c63363233eaf9c9485a358c7ff1671a570e764f1745944dc4c8a3c1e603b76e8
|
7
|
+
data.tar.gz: cb3b2def00bb03ee636eb718699a3586f2b52cd37743e0b45614012af5798bb2e2b5b5a5aa398fdde48e952d5067023630c8239042615fc405e2e0da0ac471be
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rails_dictionary (0.2.
|
5
|
-
rails (>
|
4
|
+
rails_dictionary (0.2.5)
|
5
|
+
rails (> 6.0, < 7.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: http://rubygems.org/
|
@@ -111,7 +111,7 @@ GEM
|
|
111
111
|
net-protocol
|
112
112
|
timeout
|
113
113
|
nio4r (2.5.8)
|
114
|
-
nokogiri (1.13.
|
114
|
+
nokogiri (1.13.4)
|
115
115
|
mini_portile2 (~> 2.8.0)
|
116
116
|
racc (~> 1.4)
|
117
117
|
pry (0.12.2)
|
@@ -23,7 +23,7 @@ module RailsDictionary
|
|
23
23
|
# the sort would be failed of ArgumentError: comparison of Array with Array failed
|
24
24
|
# split this method ,make it more short and maintainance
|
25
25
|
def method_missing(method_id,options={})
|
26
|
-
if DictType.all_types.include? method_id
|
26
|
+
if ::DictType.all_types.include? method_id
|
27
27
|
method_name=method_id.to_s.downcase
|
28
28
|
# TODO: If cache engine is failed, then the code will failed with null cant dup
|
29
29
|
Rails.cache.fetch("Dictionary.#{method_name}") { dict_type_name_eq(method_name).to_a }
|
@@ -56,7 +56,7 @@ module RailsDictionary
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def respond_to?(name, include_private=false)
|
59
|
-
DictType.all_types.include?(name) || super
|
59
|
+
::DictType.all_types.include?(name) || super
|
60
60
|
end
|
61
61
|
|
62
62
|
private
|
@@ -76,7 +76,7 @@ module RailsDictionary
|
|
76
76
|
|
77
77
|
module InstanceMethods
|
78
78
|
def delete_dicts_cache
|
79
|
-
method_name=DictType.revert(self.dict_type_id)
|
79
|
+
method_name = ::DictType.revert(self.dict_type_id)
|
80
80
|
Rails.cache.delete("Dictionary.#{method_name}")
|
81
81
|
return true
|
82
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_dictionary
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Raykin Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|