kadmin 0.7.2 → 0.7.3

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: 15c08b2929ebf1cb0be8677d7d503d986c8e687a
4
- data.tar.gz: 35cae93c8b4e0b20ee79997fecd2eab200d02a15
3
+ metadata.gz: 1b0ddcea024bf2bca89931a5c5514aa6dacc092c
4
+ data.tar.gz: af07f000396fada0a9e66db94f1019a7d0b6fa6d
5
5
  SHA512:
6
- metadata.gz: fee8b7bb8d7da3e3397995769b58d0c9862d1a0495f69589d1d905011cb163385f83ad9f920b502d6d7c28c70d04b09490d405d92dd998041709c5eaca4c95d5
7
- data.tar.gz: 6b1f5837987171d781ec097af10e2866bd49ae25dce802f8663cc6bdee43687e55357d2bf793ac1ca6dc3674b55cac4e6eb8ac295270173cdeba925640b843ce
6
+ metadata.gz: 3858f2768f2bf50eb5bcbb5a41226c8b3c49962f17ccb562e0bf7fbb205736005f1e55ade5919489ba584f43f8aa8c951f6cad46dfb8eaec72f03da0389a2fa6
7
+ data.tar.gz: '09cf4b1d2d340547f9fe135846462f71a23742cfbc488cf8257e16e61182dd5629a4e078ee638da66e069e1e10a821740db11bf4e46cabc3eea36343c0762228'
@@ -12,11 +12,11 @@ jQuery(document).ready(function() {
12
12
  jQuery.fn.select2.defaults.set("allowClear", true);
13
13
 
14
14
  function transformRequest(params) {
15
- var page = params.page || 0;
15
+ var page = params.page || 1;
16
16
  var page_size = this.data("kadmin--page-size") || 10;
17
17
  var filter_param = this.data("kadmin--filter-param") || null;
18
18
  var options = {
19
- page_offset: page * page_size,
19
+ page_offset: (page - 1) * page_size,
20
20
  page_size: page_size
21
21
  };
22
22
 
@@ -30,6 +30,17 @@ module Kadmin
30
30
  return rendered
31
31
  end
32
32
 
33
+ # Updates the context of the presenter with the given view
34
+ # This is mostly to provide a consistent interface between
35
+ # Presentable and Presenter, so you don't have to check if you should
36
+ # present something or not.
37
+ # @param [ActiveView::Base] view render in a different view
38
+ # @return [self] returns itself, as it is already presented
39
+ def present(view)
40
+ @view = view
41
+ return self
42
+ end
43
+
33
44
  protected
34
45
 
35
46
  # Generates the representation of the wrapped object.
@@ -1,3 +1,3 @@
1
1
  module Kadmin
2
- VERSION = '0.7.2'.freeze
2
+ VERSION = '0.7.3'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Pepin-Perreault
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-08-28 00:00:00.000000000 Z
13
+ date: 2017-09-26 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails