acts_as_bits 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/acts_as_bits.rb +2 -2
- metadata +1 -1
data/Rakefile
CHANGED
@@ -33,7 +33,7 @@ AUTHOR = "maiha"
|
|
33
33
|
EMAIL = "maiha@wota.jp"
|
34
34
|
HOMEPAGE = "http://github.com/maiha/acts_as_bits"
|
35
35
|
SUMMARY = "ActiveRecord plugin that maintains massive flags in one column"
|
36
|
-
GEM_VERSION = "0.2.
|
36
|
+
GEM_VERSION = "0.2.2"
|
37
37
|
|
38
38
|
spec = Gem::Specification.new do |s|
|
39
39
|
# s.rubyforge_project = 'merb'
|
data/lib/acts_as_bits.rb
CHANGED
@@ -38,7 +38,7 @@ module ActsAsBits
|
|
38
38
|
end
|
39
39
|
|
40
40
|
module Rails2x
|
41
|
-
def sanitize_sql_hash_with_aab(attrs)
|
41
|
+
def sanitize_sql_hash_with_aab(attrs, default_table_name = nil)
|
42
42
|
values = []
|
43
43
|
conditions = attrs.keys.map do |key|
|
44
44
|
value = attrs[key]
|
@@ -49,7 +49,7 @@ module ActsAsBits
|
|
49
49
|
table_name, attr = attr.split('.', 2)
|
50
50
|
table_name = connection.quote_table_name(table_name)
|
51
51
|
else
|
52
|
-
table_name = quoted_table_name
|
52
|
+
table_name = default_table_name || quoted_table_name
|
53
53
|
end
|
54
54
|
|
55
55
|
if bit_column = bit_columns_hash[attr]
|