rails_paginate 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -53,11 +53,25 @@ after bundle execute
53
53
 
54
54
  === ActiveRecord
55
55
 
56
- User.order(:login).where(:active => 1).paginate :page => 1, :per_page => 10
56
+ @collection = User.order(:login).where(:active => 1).paginate :page => 1, :per_page => 10
57
57
 
58
58
  === Array
59
59
 
60
- (1..555).to_a.paginate :page => 1, :per_page => 10
60
+ @collection = (1..555).to_a.paginate :page => 1, :per_page => 10
61
+
62
+ === View
63
+
64
+ # default
65
+ paginate @collection
66
+
67
+ # with class
68
+ paginate @collection, :class => "super"
69
+
70
+ # with class
71
+ paginate @collection, :class => "super"
72
+
73
+ # with ajax
74
+ paginate @collection, :remote => true, :method => :get
61
75
 
62
76
  == Requirements
63
77
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -27,14 +27,14 @@ module RailsPaginate::Renderers
27
27
  protected
28
28
 
29
29
  # link to page with i18n support
30
- def link_to_page(page, key, options = {})
31
- css_class = "#{options[:class]} #{page == current_page ? 'current' : ''}"
30
+ def link_to_page(page, key, link_options = {})
31
+ css_class = "#{link_options[:class]} #{page == current_page ? 'current' : ''}"
32
32
  if key.nil?
33
33
  content_tag :span, "..", :class => "spacer"
34
34
  elsif page.nil?
35
35
  content_tag :span, t(key), :class => "#{css_class} unavailable"
36
36
  else
37
- link_to t(key, :page => page), url_for_page(page), :class => css_class, :alt => view.strip_tags(t(key, :page => page))
37
+ link_to t(key, :page => page), url_for_page(page), :class => css_class, :alt => view.strip_tags(t(key, :page => page)), :remote => options[:remote], :method => options[:method]
38
38
  end
39
39
  end
40
40
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{rails_paginate}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Marco Scholl"]
12
- s.date = %q{2011-02-19}
12
+ s.date = %q{2011-02-22}
13
13
  s.description = %q{a new rails 3 paginate plugin as will_paginate replacement}
14
14
  s.email = %q{develop@marco-scholl.de}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rails_paginate
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.5
5
+ version: 0.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Marco Scholl
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-02-19 00:00:00 +01:00
13
+ date: 2011-02-22 00:00:00 +01:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -174,7 +174,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
174
174
  requirements:
175
175
  - - ">="
176
176
  - !ruby/object:Gem::Version
177
- hash: -152789811183962972
177
+ hash: -1494463850570476169
178
178
  segments:
179
179
  - 0
180
180
  version: "0"