tiny-record 1.0.2 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -1
- data/lib/tiny/record.rb +5 -0
- data/lib/tiny/record/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf57e4cc2dba1320f23fda494a6085e0b40d2192
|
4
|
+
data.tar.gz: 3177fdbcdf79fc389e97a981f3aa0e993012c032
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf41984edc81a44d9c32b1dac2a1ac9e0f0917ed4e81a64f3def7df5105a058a5a706e3bd534df41b2ce8a3e4d250dda0fa80c34e662f864d722f66f14fe8ed6
|
7
|
+
data.tar.gz: b804c658986dd30f9669c76cb1fe491a0fbfa737560da194d232e838897f658a1a8a9a14720df9f93dda32aed574cb619ab59700017b7987aac370d15fab25f0
|
data/CHANGELOG.md
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
[![Build Status](https://travis-ci.com/vikasvr/tiny-record.svg?branch=master)](https://travis-ci.com/vikasvr/tiny-record)
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/tiny-record.svg)](https://badge.fury.io/rb/tiny-record)
|
2
3
|
|
3
4
|
# TinyRecord
|
4
5
|
|
5
|
-
TinyRecord gives to you the capability to target columns when you try to look for active record objects specifying the columns you want to use
|
6
|
+
TinyRecord gives to you the capability to target columns when you try to look for active record objects specifying the columns you want to use.
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
data/lib/tiny/record.rb
CHANGED
@@ -20,6 +20,11 @@ module TinyRecord
|
|
20
20
|
get(columns, with).take
|
21
21
|
end
|
22
22
|
|
23
|
+
def fetch_where(columns = {})
|
24
|
+
with = columns.delete(:with)
|
25
|
+
get(columns, with)
|
26
|
+
end
|
27
|
+
|
23
28
|
def get(by_columns, with_columns)
|
24
29
|
collection = where(by_columns)
|
25
30
|
collection = collection.select(with_columns) if with_columns.present?
|
data/lib/tiny/record/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tiny-record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vikas Verma
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -104,6 +104,7 @@ extra_rdoc_files: []
|
|
104
104
|
files:
|
105
105
|
- ".gitignore"
|
106
106
|
- ".travis.yml"
|
107
|
+
- CHANGELOG.md
|
107
108
|
- CODE_OF_CONDUCT.md
|
108
109
|
- Gemfile
|
109
110
|
- Gemfile.lock
|