jm81-paginate 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/helpers/merb.rb +9 -7
  3. metadata +1 -1
data/Rakefile CHANGED
@@ -18,7 +18,7 @@ require 'merb-core'
18
18
  require 'merb-core/tasks/merb'
19
19
 
20
20
  GEM_NAME = "paginate"
21
- GEM_VERSION = "0.1.2"
21
+ GEM_VERSION = "0.1.3"
22
22
  AUTHOR = "Jared Morgan"
23
23
  EMAIL = "jmorgan@morgancreative.net"
24
24
  HOMEPAGE = "http://github.com/jm81/paginate/"
data/lib/helpers/merb.rb CHANGED
@@ -41,28 +41,30 @@ module Paginate
41
41
  pages = collection.pages
42
42
 
43
43
  tag(:div, :class => 'pageLinks') do
44
+ html = ''
44
45
  if current == 1
45
- tag(:span, '«', :class => 'pageDisabled pagePrevious')
46
+ html << tag(:span, '&laquo;', :class => 'pageDisabled pagePrevious')
46
47
  else
47
- tag(:a, '&laquo;', :href => page_url(current - 1), :class => 'pagePrevious')
48
+ html << tag(:a, '&laquo;', :href => page_url(current - 1), :class => 'pagePrevious')
48
49
  end
49
50
 
50
51
  page_set(current, pages, padding).each do |page|
51
52
  case page
52
53
  when 0
53
- tag(:span, "...", :class => 'pageSpacer')
54
+ html << tag(:span, "...", :class => 'pageSpacer')
54
55
  when current
55
- tag(:span, page, :class => 'pageCurrent')
56
+ html << tag(:span, page, :class => 'pageCurrent')
56
57
  else
57
- tag(:a, page, :href => page_url(page), :class => 'pageNumber')
58
+ html << tag(:a, page, :href => page_url(page), :class => 'pageNumber')
58
59
  end
59
60
  end
60
61
 
61
62
  if current == pages
62
- tag(:span, '&raquo;', :class => 'pageDisabled pageNext')
63
+ html << tag(:span, '&raquo;', :class => 'pageDisabled pageNext')
63
64
  else
64
- tag(:a, '&raquo;', :href => page_url(current + 1), :class => 'pageNext')
65
+ html << tag(:a, '&raquo;', :href => page_url(current + 1), :class => 'pageNext')
65
66
  end
67
+ html
66
68
  end
67
69
  end
68
70
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jm81-paginate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jared Morgan