sql_enum 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/active_record/enum_override.rb +1 -1
- data/lib/sql_enum/version.rb +1 -1
- data/lib/sql_enum.rb +8 -8
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7df07c9d1ef110523da51ed7f0b2550ec1809f84
|
4
|
+
data.tar.gz: efa2e03748856de6da182b2635f16e3dc276a74e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 107b0da16e773d658326ba2d819e5aa684fdfdef741c7b58519c41b86ab3184a11d67d23e55c75caa8b1bb32844ecd4e238bbdb815e4fde40b04bdb456c96ca9
|
7
|
+
data.tar.gz: 133795064b7aea3675a13a211243c932825fa73ddd00527240abfb21638197db6ae672ea402cbb1b1eac5c0b4eba249e6223c50bf7725c2748b36bfc21f8dae1
|
data/Gemfile.lock
CHANGED
@@ -41,7 +41,7 @@ module ActiveRecord
|
|
41
41
|
|
42
42
|
# def active?() status == 0 end
|
43
43
|
klass.send(:detect_enum_conflict!, name, "#{value_method_name}?")
|
44
|
-
define_method("#{value_method_name}?") {
|
44
|
+
define_method("#{value_method_name}?") { self[attr] == value.to_s }
|
45
45
|
|
46
46
|
# def active!() update! status: :active end
|
47
47
|
klass.send(:detect_enum_conflict!, name, "#{value_method_name}!")
|
data/lib/sql_enum/version.rb
CHANGED
data/lib/sql_enum.rb
CHANGED
@@ -1,13 +1,5 @@
|
|
1
1
|
require 'active_record'
|
2
2
|
|
3
|
-
require_relative 'active_record/enum/enum_type'
|
4
|
-
require_relative 'active_record/type/enum'
|
5
|
-
require_relative 'active_record/enum_override'
|
6
|
-
require_relative 'active_record/connection_adapters/mysql2'
|
7
|
-
require_relative 'active_record/connection_adapters/abstract_mysql'
|
8
|
-
require_relative 'active_record/connection_adapters/mysql/column_methods'
|
9
|
-
require_relative "sql_enum/version"
|
10
|
-
|
11
3
|
module SqlEnum
|
12
4
|
class << self
|
13
5
|
attr_accessor :configuration
|
@@ -27,3 +19,11 @@ module SqlEnum
|
|
27
19
|
end
|
28
20
|
end
|
29
21
|
end
|
22
|
+
|
23
|
+
require_relative 'active_record/enum/enum_type'
|
24
|
+
require_relative 'active_record/type/enum'
|
25
|
+
require_relative 'active_record/enum_override'
|
26
|
+
require_relative 'active_record/connection_adapters/mysql2'
|
27
|
+
require_relative 'active_record/connection_adapters/abstract_mysql'
|
28
|
+
require_relative 'active_record/connection_adapters/mysql/column_methods'
|
29
|
+
require_relative "sql_enum/version"
|