zobi 4.0.1 → 4.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +10 -2
- data/app/decorators/zobi/collection_decorator.rb +5 -3
- data/app/decorators/zobi/resource_decorator.rb +5 -3
- data/lib/zobi/scoped.rb +1 -2
- data/lib/zobi/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: 0f51cb3ce3c2c79ea07404701681a4af63673814
|
4
|
+
data.tar.gz: 7de5688023e861d0ac5f049ad8358e6f29ff276f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c75084d6080751307ac85ccc446f6f7efcce7995b99093d8d9404caff51e51547ef5e44b1726b662d4a64bdbcef5398dd64bce2a78e94df911b9bf70c76d966
|
7
|
+
data.tar.gz: 8776ace9dab152adb558e87d4d7114a4aafdd3500e556b75d64136d7383577e54dcb0252f1e580184989261049fd1e914db69d7a79c58855889f05c07a421ff2
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ How to use it?
|
|
17
17
|
Add it in your `Gemfile` and run `bundle install`:
|
18
18
|
|
19
19
|
```ruby
|
20
|
-
gem 'zobi', '~> 4.0.
|
20
|
+
gem 'zobi', '~> 4.0.1'
|
21
21
|
```
|
22
22
|
|
23
23
|
Next, include Zobi module in your controller and set modules you want to
|
@@ -34,7 +34,8 @@ Available modules
|
|
34
34
|
### Inherited
|
35
35
|
|
36
36
|
This module uses
|
37
|
-
[inherited_resources](https://github.com/josevalim/inherited_resources) gem
|
37
|
+
[inherited_resources](https://github.com/josevalim/inherited_resources) gem
|
38
|
+
(for version >= 1.4.0).
|
38
39
|
|
39
40
|
This module deals with String Parameters using Parameters classes.
|
40
41
|
|
@@ -90,6 +91,13 @@ This module uses [has_scope](https://github.com/plataformatec/has_scope) gem.
|
|
90
91
|
This module only works with ActiveRecord because it uses the
|
91
92
|
[Eager Loading Associations of Active Record](http://guides.rubyonrails.org/active_record_querying.html#eager-loading-associations).
|
92
93
|
|
94
|
+
You just need to define a method named includes and add the associations to load.
|
95
|
+
|
96
|
+
``` ruby
|
97
|
+
def includes
|
98
|
+
[:association]
|
99
|
+
end
|
100
|
+
```
|
93
101
|
|
94
102
|
### Paginated
|
95
103
|
|
@@ -1,7 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
if defined? Draper
|
4
|
+
module Zobi
|
5
|
+
class CollectionDecorator < Draper::CollectionDecorator
|
6
|
+
include Draper::AutomaticDelegation
|
7
|
+
end
|
6
8
|
end
|
7
9
|
end
|
data/lib/zobi/scoped.rb
CHANGED
data/lib/zobi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zobi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- klacointe
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
262
|
version: '0'
|
263
263
|
requirements: []
|
264
264
|
rubyforge_project:
|
265
|
-
rubygems_version: 2.2.
|
265
|
+
rubygems_version: 2.2.2
|
266
266
|
signing_key:
|
267
267
|
specification_version: 4
|
268
268
|
summary: Keep your rails controllers DRY.
|