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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8eeb0d4989bfd0590bac164e86b7a39d27c823b
4
- data.tar.gz: c5cee3c01e0b84e90c59106c49098a7de03d90c0
3
+ metadata.gz: 0f51cb3ce3c2c79ea07404701681a4af63673814
4
+ data.tar.gz: 7de5688023e861d0ac5f049ad8358e6f29ff276f
5
5
  SHA512:
6
- metadata.gz: df7ffcd03557e68805551d224d3e10134149bc01cb493efb65af30454ac47f226ffb2fc8ce367b1afb04a401c6f20aa7c703eb16f701505a5e0774c12077d02d
7
- data.tar.gz: b45f04bffcaa2b892baa59527ced50294b48b907a9f6671c5f23510bf97325cef9b292208c76d16bd3829674bef898d1f2195a96d345b795fc79a3efc52a7398
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.0.rc2'
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
- module Zobi
4
- class CollectionDecorator < Draper::CollectionDecorator
5
- include Draper::AutomaticDelegation
3
+ if defined? Draper
4
+ module Zobi
5
+ class CollectionDecorator < Draper::CollectionDecorator
6
+ include Draper::AutomaticDelegation
7
+ end
6
8
  end
7
9
  end
@@ -1,7 +1,9 @@
1
1
  # encoding: utf-8
2
2
 
3
- module Zobi
4
- class ResourceDecorator < Draper::Decorator
5
- delegate_all
3
+ if defined? Draper
4
+ module Zobi
5
+ class ResourceDecorator < Draper::Decorator
6
+ delegate_all
7
+ end
6
8
  end
7
9
  end
@@ -12,8 +12,7 @@ module Zobi
12
12
  protected
13
13
 
14
14
  def filters_list
15
- return [] unless scopes_conf = scopes_configuration
16
- scopes_conf.keys
15
+ Hash(scopes_configuration).keys
17
16
  end
18
17
 
19
18
  private
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module Zobi
3
- VERSION = "4.0.1"
3
+ VERSION = "4.0.2"
4
4
  end
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.1
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-03-31 00:00:00.000000000 Z
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.0
265
+ rubygems_version: 2.2.2
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: Keep your rails controllers DRY.