filta 0.0.4 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/VERSION +1 -1
- data/lib/filta/methods.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d8bdd97e5e9569db4a38ef0416d4fd0df8dc2d8
|
4
|
+
data.tar.gz: 3705da7e08c678d20bc041fc57109b1ac01e6061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4bb3b438b294ca326faafe027c0c9fb1e6b9b6aff02590c019937be22243fc8c123005837d24a891444e6a60f91cccd1a47e7cc3bca5bc8518d1a3b79a4f796d
|
7
|
+
data.tar.gz: c9cd40609e9db70ae3cfed4222689f5c6823a587b6f71ca0ca84db9436ee51be9ce83806130eb085d329f2ad1032102d358e10fe3a912f44ca3e1703f8ceeada
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Super simple filtering for ActiveRecord, inspired by [Justin Weiss' Gist](https://gist.github.com/justinweiss/9065666).
|
4
4
|
|
5
5
|
[![Gem Version](https://badge.fury.io/rb/filta.svg)](https://badge.fury.io/rb/filta)
|
6
|
-
[![Build Status](https://
|
6
|
+
[![Build Status](https://travis-ci.org/sleepingstu/filta.svg?branch=master)](https://travis-ci.org/sleepingstu/filta)
|
7
7
|
|
8
8
|
<!-- MarkdownTOC -->
|
9
9
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0
|
1
|
+
0.1.0
|
data/lib/filta/methods.rb
CHANGED
@@ -10,7 +10,7 @@ module Filta
|
|
10
10
|
results = self.where(nil)
|
11
11
|
|
12
12
|
by.each do |key, value|
|
13
|
-
results = results.where("#{key}
|
13
|
+
results = results.where("#{key}".to_sym => value) if value.present?
|
14
14
|
end
|
15
15
|
|
16
16
|
results
|
@@ -18,4 +18,4 @@ module Filta
|
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
21
|
-
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filta
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Chinery
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|