incline 0.2.10 → 0.2.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/incline/data_tables_request.rb +10 -3
- data/lib/incline/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5b62ef18063f4f8e5d9cd50a5212c011f4025ac8
|
4
|
+
data.tar.gz: faa2c8e63f99e0866c11d6f5d9543c25b660e8db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a76f806e068b464f719accea58c8a5696b27d0a2ea4f046bb42859f7e0cc65974bdd7c67b814cd44fa7993328e05760171df0e4b1900f49fe598de452cccfa
|
7
|
+
data.tar.gz: 49e8511afada33dc58eb6b4c7d787b6e2f86bb3abbab9314bd4c34cec6d681a68403649b517349f65d728e420ef9dea16c497f186de94a448c4af2a595cba4be
|
data/Gemfile.lock
CHANGED
@@ -203,14 +203,21 @@ module Incline
|
|
203
203
|
##
|
204
204
|
# Find the record represented by #locate_id.
|
205
205
|
def find_record(relation = nil)
|
206
|
-
|
206
|
+
if locate_id.nil? || (locate_id.is_a?(::Numeric) && locate_id == 0) || (locate_id.to_s == '')
|
207
|
+
return -1
|
208
|
+
end
|
207
209
|
|
208
210
|
dataset = load_records(relation, false)
|
209
211
|
return -1 if dataset.blank?
|
210
212
|
|
211
213
|
return -1 unless dataset.first.respond_to?(:id)
|
212
|
-
|
213
|
-
|
214
|
+
if locate_id.is_a?(::Numeric)
|
215
|
+
dataset.index{|item| item.id == locate_id} || -1
|
216
|
+
else
|
217
|
+
loc_id = locate_id.to_s.downcase
|
218
|
+
dataset.index{|item| item.id.to_s.downcase == loc_id} || -1
|
219
|
+
end
|
220
|
+
|
214
221
|
end
|
215
222
|
|
216
223
|
##
|
data/lib/incline/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: incline
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Beau Barker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -604,7 +604,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
604
604
|
version: '0'
|
605
605
|
requirements: []
|
606
606
|
rubyforge_project:
|
607
|
-
rubygems_version: 2.
|
607
|
+
rubygems_version: 2.5.2
|
608
608
|
signing_key:
|
609
609
|
specification_version: 4
|
610
610
|
summary: A gem designed to get off to an even quicker start with Rails.
|