hal_api-rails 0.3.5 → 0.3.6

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: 19cfd5d88b89d4ef4cb6266c1b99504759ebe9f6
4
- data.tar.gz: 8f9252058b5147d0fc68cde33ce6d0a00cc2c451
3
+ metadata.gz: 8678b3ab4a5bfb9bc83b5f4bf013d803d5de6104
4
+ data.tar.gz: b0aa82a4fece7b45148c32682b9d5b1e32544b08
5
5
  SHA512:
6
- metadata.gz: 1ea78ca42990363713271298545de90d6d7a1509d675976da965f781c1a746b5a42757ccd06e44934aa6d0e3ff1e317af383d6efd6dec9c439d24bf2f1709d56
7
- data.tar.gz: 6a237f1f26ef95e4aa3f3dfc5187c246e8a5af4dc12491a68ee6603472cdb699453130e95a32696257a4ae13086449bab5bdd49696b5d258698fb7617c45534d
6
+ metadata.gz: dd471e3c6021411822b4a066d9274f7f7968189b2c3e5f076559e929d1d36f4c1b39fe06cd88d5435f3bc77852acda9374b033326c09e220a5c675ac5092feb0
7
+ data.tar.gz: afa2bb422706e177a168d3431a092e37c8dbce20e521d0c8214dc9d827d2dc4c7f88d8d29f4bcc857ccc8210d10b330e8f62d91f1c0a0525121bbb453bdef7e9
@@ -98,7 +98,11 @@ module HalApi::Controller::Resources
98
98
  end
99
99
 
100
100
  def paged(arel)
101
- arel.page(params[:page]).per(params[:per])
101
+ if params[:per].to_i <= 0
102
+ arel.page(params[:page]).per(Kaminari.config.default_per_page)
103
+ else
104
+ arel.page(params[:page]).per(params[:per])
105
+ end
102
106
  end
103
107
 
104
108
  def scoped(res)
@@ -1,5 +1,5 @@
1
1
  module HalApi
2
2
  module Rails
3
- VERSION = "0.3.5"
3
+ VERSION = "0.3.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hal_api-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Rhoden