wor-paginate 0.1.5a → 0.1.5

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
  SHA256:
3
- metadata.gz: a7bfb0360345a51c5eb2ab8ed52d90f3dc7032155830e37b48a83e09e049f1fd
4
- data.tar.gz: f145fa8f27deb86310b600ff75b2623a620ea7445cfca7f387fabe2dcb000471
3
+ metadata.gz: e642dcd7e5593d0db78018d072f65cf1f0ead2393bed43e3c474c72738c06710
4
+ data.tar.gz: 970b90f2c5dce5a30e250bb294c0cc83e67a8c742ccf47abf091b3243e572492
5
5
  SHA512:
6
- metadata.gz: 9cfa29bf30aacda22b8f2702018b078de0e1c1631aa5f51366bc69a9d5a2fe7fd74ec2514d44597357fc604912718205b756fe43e5cee68cb01f492659235fa9
7
- data.tar.gz: 84576e26892ca4d718084e0d064323a0d46e73e209085409e8f77577f115aac38eb4fb491a05f50a7a95a531e55c0284a218946f0ae303e0151fd126c13e5ce8
6
+ metadata.gz: e4ec15809e387854ec114da96b562bb8136e4a840e8112b0d4c7e2e2dd3120c097740e0559caf93b4477b6059fc9377d200a2988a6c465f30d504dbf912ab77e
7
+ data.tar.gz: f0e1ff9a99b57c4fa52a336bba2a3d13e7e1d79b493c39cb5e21b80b47fee7df5229ea01786f1100ac94c199f4c6322de9b4aca8c03088c3e41e44336aabd321
data/CHANGELOG.md CHANGED
@@ -1,7 +1,5 @@
1
1
  ## Change log
2
2
 
3
- ### V0.1.5a
4
- * [#62](https://github.com/Wolox/wor-paginate/pull/62): Add options in active model serializer - [@blacksam07](https://github.com/blacksam07).
5
3
 
6
4
  ### V0.1.5
7
5
  * [#59](https://github.com/Wolox/wor-paginate/pull/59): Add include option to serialize nested models - [@jcgrethe](https://github.com/jcgrethe).
data/README.md CHANGED
@@ -104,20 +104,6 @@ render_paginated DummyModel, each_serializer: CustomDummyModelSerializer
104
104
  ```
105
105
  where the serializer is just an [`ActiveModel::Serializer`](https://github.com/rails-api/active_model_serializers).
106
106
 
107
- #### Custom options
108
- Using custom options in serializer, example method `current_user`
109
- ```ruby
110
- render_paginated DummyModel, each_serializer: CustomDummyModelSerializer, current_user: current_user
111
- ```
112
- In serializer
113
- ```ruby
114
- class CustomSerializer < ActiveModel::Serializer
115
- def method
116
- @instance_options[:current_user]
117
- end
118
- end
119
- ```
120
-
121
107
  #### Custom formatters
122
108
  A formatter is an object that defines the output of the render_paginated method. In case the application needs a different format for a request, it can be passed to the `render_paginated` method using the `formatter` option:
123
109
  ```ruby
@@ -33,7 +33,7 @@ module Wor
33
33
 
34
34
  def serialized_content
35
35
  if serializer.present?
36
- return paginated_content.map { |item| serializer.new(item, options) }
36
+ return paginated_content.map { |item| serializer.new(item, scope: options[:scope]) }
37
37
  end
38
38
  if defined? ActiveModelSerializers::SerializableResource
39
39
  ActiveModelSerializers::SerializableResource.new(paginated_content).as_json
@@ -1,5 +1,5 @@
1
1
  module Wor
2
2
  module Paginate
3
- VERSION = '0.1.5a'.freeze
3
+ VERSION = '0.1.5'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wor-paginate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5a
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - icoluccio
@@ -103,9 +103,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  required_rubygems_version: !ruby/object:Gem::Requirement
105
105
  requirements:
106
- - - ">"
106
+ - - ">="
107
107
  - !ruby/object:Gem::Version
108
- version: 1.3.1
108
+ version: '0'
109
109
  requirements: []
110
110
  rubygems_version: 3.0.2
111
111
  signing_key: