multipluck 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +12 -7
- data/lib/multipluck/version.rb +1 -1
- metadata +6 -6
data/README.md
CHANGED
@@ -1,18 +1,23 @@
|
|
1
|
-
|
1
|
+
Multipluck is a Ruby gem for rails that enhances the .pluck function to select multiple columns
|
2
2
|
|
3
|
-
|
3
|
+
### Usage
|
4
4
|
|
5
|
-
|
6
|
-
|
5
|
+
```ruby
|
6
|
+
# Fetch all user ids and names
|
7
7
|
|
8
|
-
|
8
|
+
User.pluck([:id, :name])
|
9
|
+
# => [ [1, "Bob"], [2, "Simone"], ... ]
|
10
|
+
```
|
9
11
|
|
10
|
-
|
12
|
+
### Installation
|
11
13
|
|
12
14
|
1. Add the gem to your Gemfile
|
13
15
|
|
14
|
-
|
16
|
+
```ruby
|
17
|
+
gem 'multipluck'
|
18
|
+
```
|
15
19
|
|
16
20
|
2. Pluck forth!
|
17
21
|
|
22
|
+
|
18
23
|
This project rocks and uses MIT-LICENSE. Yes it does.
|
data/lib/multipluck/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multipluck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,18 +13,18 @@ date: 2012-04-23 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70354665098040 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 3.2.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70354665098040
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: sqlite3
|
27
|
-
requirement: &
|
27
|
+
requirement: &70354665097620 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,7 +32,7 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70354665097620
|
36
36
|
description:
|
37
37
|
email:
|
38
38
|
- davidwright@gmail.com
|