activemodel_flags 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/activemodel_flags/has_flags.rb +0 -27
- data/lib/activemodel_flags/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0ebf8b86b9070587d37159b204cb10364fdb6db1
|
4
|
+
data.tar.gz: 2595185464b777d6356403cf029eae5552f97d39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b30b23dd1add7f674ee5061a0e49bc07909f043cc43958f6e30afd045ff0958ebcdc763da7d13b144d1903baee6c202b60648ccd4945de430485789c7d48ce8
|
7
|
+
data.tar.gz: 810172a0a4b93fd39de9cd53e3e51954c503110173e82ff70e006c51f9fa36e2d942c7c8b54d747d2a36d0940e88b35288c87e98009a84d2ff6144cb5e01303f
|
@@ -128,33 +128,6 @@ module ActivemodelFlags
|
|
128
128
|
self.save!
|
129
129
|
end
|
130
130
|
|
131
|
-
# TODO implement the ability to
|
132
|
-
# def method_missing(method)
|
133
|
-
# if method.to_s =~ /has_[a-zA-Z0-9_]+\?/
|
134
|
-
# key = method.to_s.chomp("?").reverse.chomp("_sah").reverse
|
135
|
-
# has = true
|
136
|
-
# elsif method.to_s =~ /hasnt_[a-zA-Z0-9_]+\?/
|
137
|
-
# key = method.to_s.chomp("?").reverse.chomp("_tnsah").reverse
|
138
|
-
# has = false
|
139
|
-
# elsif method.to_s =~ /has_not_[a-zA-Z0-9_]+\?/
|
140
|
-
# key = method.to_s.chomp("?").reverse.chomp("_ton_sah").reverse
|
141
|
-
# has = false
|
142
|
-
# else
|
143
|
-
# return super
|
144
|
-
# end
|
145
|
-
#
|
146
|
-
# if has_flag?(method.to_s)
|
147
|
-
# has ? has?(key) : hasnt?(key)
|
148
|
-
# else
|
149
|
-
# puts "*************** NO METHOD!! "
|
150
|
-
# super
|
151
|
-
# end
|
152
|
-
# end
|
153
|
-
|
154
|
-
def respond_to?(method)
|
155
|
-
has_flag?(method.to_s) || super(method)
|
156
|
-
end
|
157
|
-
|
158
131
|
protected
|
159
132
|
|
160
133
|
def on_flag_change(old_val, new_val)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemodel_flags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay El-Kaake
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-06-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -138,10 +138,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
138
138
|
version: '0'
|
139
139
|
requirements: []
|
140
140
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.
|
141
|
+
rubygems_version: 2.6.10
|
142
142
|
signing_key:
|
143
143
|
specification_version: 4
|
144
144
|
summary: Adds beautifully readable true/false flags to user and account active models
|
145
145
|
(like devise).
|
146
146
|
test_files: []
|
147
|
-
has_rdoc:
|