restpack-resource 0.1.3 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- restpack-resource (0.1.1)
4
+ restpack-resource (0.1.4)
5
5
  activesupport (~> 3.2.11)
6
6
  datamapper (~> 1.2.0)
7
7
  dm-pager (~> 1.1.0)
@@ -4,12 +4,14 @@ module RestPack
4
4
  module Service
5
5
 
6
6
  def paged_resource(klass, params, options = {})
7
+ p "paged_resource: params: #{params}"
7
8
  options[:page] ||= params[:page].to_i if params[:page]
8
9
  options[:includes] ||= extract_includes_from_params(params) unless params[:includes].nil?
9
10
  options[:sort_by] ||= params[:sort_by].to_sym if params[:sort_by]
10
11
  options[:sort_direction] ||= params[:sort_direction].to_sym if params[:sort_direction]
11
12
 
12
13
  filters = extract_filters_from_params(klass, params)
14
+ p "paged_resource: filters: #{filters}"
13
15
  options[:filters] ||= filters unless filters.empty?
14
16
 
15
17
  klass.paged_resource(options)
@@ -1,5 +1,5 @@
1
1
  module RestPack
2
2
  module Resource
3
- VERSION = "0.1.3"
3
+ VERSION = "0.1.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restpack-resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: