enum_column 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/enum_column/quoting.rb +6 -8
- data/lib/enum_column/version.rb +1 -1
- metadata +4 -4
data/lib/enum_column/quoting.rb
CHANGED
@@ -1,17 +1,15 @@
|
|
1
1
|
module ActiveRecord
|
2
2
|
module ConnectionAdapters # :nodoc:
|
3
3
|
module Quoting
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
# enumerated values.
|
8
|
-
def quote(value, column = nil)
|
9
|
-
if !value.is_a? Symbol
|
10
|
-
__quote_enum(value, column)
|
4
|
+
def quote_with_enum(value, column = nil)
|
5
|
+
if value.is_a?(Symbol)
|
6
|
+
quote_without_enum(value.to_s, column)
|
11
7
|
else
|
12
|
-
|
8
|
+
quote_without_enum(value, column)
|
13
9
|
end
|
14
10
|
end
|
11
|
+
|
12
|
+
alias_method_chain :quote, :enum
|
15
13
|
end
|
16
14
|
end
|
17
15
|
end
|
data/lib/enum_column/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: enum_column
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 6
|
10
|
+
version: 0.1.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Stephan Kaag
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
19
|
+
date: 2011-05-25 00:00:00 +02:00
|
20
20
|
default_executable:
|
21
21
|
dependencies: []
|
22
22
|
|