get 0.1.5.0 → 0.1.5.1
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.
- checksums.yaml +4 -4
- data/README.md +14 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 153f8e765a91ccd4bc414347eea1d20f97271cf7
|
4
|
+
data.tar.gz: 6aad5e37b8ce974a0d0b7cd09e7e763745578652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5f561e76ab4db43501d9fc162d32f3a059e58605cccd21afbd42a38494191437b915f301944a7c6a5c90bc2300278e4431313f9aa046d8d88c67f6e7f5c20b7c
|
7
|
+
data.tar.gz: de12156579d20d990fce70a28aea8d911a6c74ded637dac62b272f2440a7760e00ad48800b89c9e3a76721d1751eac785f70757c6e2970f9eac1ede78d9ea2f0
|
data/README.md
CHANGED
@@ -228,6 +228,8 @@ Get currently works with ActiveRecord.
|
|
228
228
|
|
229
229
|
## Edge Cases
|
230
230
|
|
231
|
+
**Attributes containing 'By'**
|
232
|
+
|
231
233
|
Some attributes contain the word 'by', ie. `Customer.invited_by`.
|
232
234
|
Because of the way Get parses classnames, you won't be able to use the attribute-specific format.
|
233
235
|
Use the more general form instead.
|
@@ -237,6 +239,18 @@ Get::CustomerByInvitedBy.run('John') #=> throws Get::Errors::InvalidClassName
|
|
237
239
|
Get::CustomerBy.run(invited_by: 'John') #=> will work
|
238
240
|
```
|
239
241
|
|
242
|
+
**Models ending with double 's'**
|
243
|
+
|
244
|
+
Some models end with a double 's', ie `Address`, `Business`. Rails has a well documented inability to properly inflect this type of word.
|
245
|
+
There is a simple fix:
|
246
|
+
|
247
|
+
```ruby
|
248
|
+
# config/initializers/inflections.rb
|
249
|
+
ActiveSupport::Inflector.inflections do |inflect|
|
250
|
+
inflect.singular(/ess$/i, 'ess')
|
251
|
+
end
|
252
|
+
```
|
253
|
+
|
240
254
|
## Benchmarking
|
241
255
|
|
242
256
|
Get requests generally run < 1ms slower than ActiveRecord requests.
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: get
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.5.
|
4
|
+
version: 0.1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Turner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: horza
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.2.
|
19
|
+
version: 0.2.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.2.
|
26
|
+
version: 0.2.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|