sequel-bit_fields 0.7.0 → 0.8.0

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.
@@ -79,10 +79,11 @@ module Sequel::Plugins
79
79
  # "status_bits & 1 = 1"
80
80
  #
81
81
  define_method("#{bit_field_name}_sql") do |*args|
82
- value = [*args].first
83
- value = true if value.nil?
82
+ value = [*args].first
83
+ value = true if value.nil?
84
+ options = { :table => self.table_name.to_s }.merge([*args][1] || {})
84
85
 
85
- "`#{self.table_name.to_s}`.`#{bit_field_column}` & #{index} #{'!' unless value}= #{index}"
86
+ "`#{options[:table]}`.`#{bit_field_column}` & #{index} #{'!' unless value}= #{index}"
86
87
  end
87
88
  end
88
89
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-bit_fields
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-12 00:00:00.000000000 Z
12
+ date: 2013-02-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sequel
@@ -49,7 +49,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
49
49
  version: '0'
50
50
  segments:
51
51
  - 0
52
- hash: -1276415395791307039
52
+ hash: -4060138488633900959
53
53
  required_rubygems_version: !ruby/object:Gem::Requirement
54
54
  none: false
55
55
  requirements: