squeel 1.0.7 → 1.0.8
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/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/squeel/version.rb
CHANGED
@@ -45,6 +45,22 @@ module Squeel
|
|
45
45
|
|
46
46
|
end
|
47
47
|
|
48
|
+
describe 'finding by attribute' do
|
49
|
+
|
50
|
+
it 'returns nil when passed an empty string' do
|
51
|
+
Person.find_by_id('').should be_nil
|
52
|
+
end
|
53
|
+
|
54
|
+
it 'casts an empty string to the proper value' do
|
55
|
+
queries = queries_for do
|
56
|
+
Person.find_by_id('')
|
57
|
+
end
|
58
|
+
queries.should have(1).query
|
59
|
+
queries.first.should match /"people"."id" = 0/
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
|
48
64
|
describe '#build_arel' do
|
49
65
|
|
50
66
|
it 'joins associations' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: squeel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
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: 2012-07-
|
12
|
+
date: 2012-07-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -240,7 +240,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
240
240
|
version: '0'
|
241
241
|
segments:
|
242
242
|
- 0
|
243
|
-
hash:
|
243
|
+
hash: 2726279138342504508
|
244
244
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
245
245
|
none: false
|
246
246
|
requirements:
|
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
version: '0'
|
250
250
|
segments:
|
251
251
|
- 0
|
252
|
-
hash:
|
252
|
+
hash: 2726279138342504508
|
253
253
|
requirements: []
|
254
254
|
rubyforge_project: squeel
|
255
255
|
rubygems_version: 1.8.24
|