kaminari 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of kaminari might be problematic. Click here for more details.

data/CHANGELOG CHANGED
@@ -1,9 +1,23 @@
1
+ == 0.9.5
2
+
3
+ * works on AR 3.0.0 and 3.0.1 now #4 [danillos]
4
+
5
+ == 0.9.4
6
+
7
+ * introduced module based tags
8
+ As a side effect of this internal change, I have to confess that this
9
+ version brings you a slight backward incompatibility on template API.
10
+ If you're using custom templates, be sure to update your existing templates.
11
+ To catch up the new API, you need to update %w[next_url prev_url page_url]
12
+ local variables to simple 'url' like this.
13
+ https://github.com/amatsuda/kaminari/commit/da88729
14
+
1
15
  == 0.9.3
2
16
 
3
17
  * improved template detection logic
4
18
  When a template for a tag could not be found in the app/views/kaminari/
5
- directory, it searches the tag's ancestor template files before falling back
6
- to engine's default template. This may help keeping your custom templates DRY.
19
+ directory, it searches the tag's ancestor template files before falling back
20
+ to engine's default template. This may help keeping your custom templates DRY.
7
21
 
8
22
  * simplified bundled template themes
9
23
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.4
1
+ 0.9.5
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{kaminari}
8
- s.version = "0.9.4"
8
+ s.version = "0.9.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Akira Matsuda"]
@@ -15,11 +15,11 @@ module Kaminari
15
15
  kls.class_eval do
16
16
  # page(5)
17
17
  scope :page, lambda {|num|
18
- offset(PER_PAGE * ([num.to_i, 1].max - 1)).limit(PER_PAGE)
18
+ limit(PER_PAGE).offset(PER_PAGE * ([num.to_i, 1].max - 1))
19
19
  } do
20
20
  # page(3).per(10)
21
21
  def per(num)
22
- offset(offset_value / limit_value * num).limit(num)
22
+ limit(num).offset(offset_value / limit_value * num)
23
23
  end
24
24
 
25
25
  def num_pages
@@ -13,8 +13,8 @@ module Kaminari
13
13
  # e.g.) FirstPageLink -> app/views/kaminari/_first_page_link.html.erb
14
14
  # -> app/views/kaminari/_page_link.html.erb
15
15
  #
16
- # When no template were found in your app, finally the engine's pre insatalled
17
- # template will be used.
16
+ # When no matching template were found in your app, finally the engine's pre
17
+ # installed template will be used.
18
18
  # e.g.) Paginator -> $GEM_HOME/kaminari-x.x.x/app/views/kaminari/_paginator.html.erb
19
19
  class Tag
20
20
  def initialize(renderer, options = {}) #:nodoc:
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kaminari
3
3
  version: !ruby/object:Gem::Version
4
- hash: 51
4
+ hash: 49
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 4
10
- version: 0.9.4
9
+ - 5
10
+ version: 0.9.5
11
11
  platform: ruby
12
12
  authors:
13
13
  - Akira Matsuda