Replaced will_paginate with kaminari
This commit is contained in:
parent
9f8906d840
commit
06ab49ecec
2
Gemfile
2
Gemfile
@ -13,7 +13,7 @@ gem 'devise_bushido_authenticatable', '1.0.0.alpha10', :require => 'devise_cas_a
|
||||
gem 'mongoid', '~> 2.0.2'
|
||||
gem 'bson_ext', '~> 1.4.0'
|
||||
gem 'locomotive_mongoid_acts_as_tree', '0.1.5.7', :require => 'mongoid_acts_as_tree'
|
||||
gem 'will_paginate', '~> 3.0.0'
|
||||
gem 'kaminari'
|
||||
|
||||
gem 'haml', '3.1.2'
|
||||
gem 'sass', '3.1.2'
|
||||
|
@ -145,6 +145,8 @@ GEM
|
||||
yui-compressor (>= 0.9.3)
|
||||
json (1.6.1)
|
||||
json_pure (1.6.1)
|
||||
kaminari (0.12.4)
|
||||
rails (>= 3.0.0)
|
||||
kgio (2.6.0)
|
||||
launchy (0.3.7)
|
||||
configuration (>= 0.0.5)
|
||||
@ -270,7 +272,6 @@ GEM
|
||||
raindrops (~> 0.6)
|
||||
warden (1.0.5)
|
||||
rack (>= 1.0)
|
||||
will_paginate (3.0.2)
|
||||
xpath (0.1.4)
|
||||
nokogiri (~> 1.3)
|
||||
yui-compressor (0.9.6)
|
||||
@ -309,6 +310,7 @@ DEPENDENCIES
|
||||
highline
|
||||
httparty (= 0.7.8)
|
||||
inherited_resources (~> 1.1.2)
|
||||
kaminari
|
||||
launchy
|
||||
linecache (= 0.43)
|
||||
locomotive_jammit-s3
|
||||
@ -332,5 +334,4 @@ DEPENDENCIES
|
||||
spork (~> 0.9.0.rc)
|
||||
unicorn
|
||||
warden
|
||||
will_paginate (~> 3.0.0)
|
||||
xpath (~> 0.1.4)
|
||||
|
@ -1,2 +0,0 @@
|
||||
require 'will_paginate/array'
|
||||
require 'locomotive/liquid/drops/will_paginate_extension'
|
@ -1,13 +0,0 @@
|
||||
class WillPaginate::Collection
|
||||
def to_liquid
|
||||
{
|
||||
:collection => self.to_a,
|
||||
:current_page => current_page,
|
||||
:previous_page => previous_page,
|
||||
:next_page => next_page,
|
||||
:total_entries => total_entries,
|
||||
:total_pages => total_pages,
|
||||
:per_page => per_page
|
||||
}
|
||||
end
|
||||
end
|
@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
||||
s.add_dependency 'mongoid', '~> 2.0.2'
|
||||
s.add_dependency 'bson_ext', '~> 1.4.0'
|
||||
s.add_dependency 'locomotive_mongoid_acts_as_tree', '0.1.5.7'
|
||||
s.add_dependency 'will_paginate', '~> 3.0.0'
|
||||
s.add_dependency 'kaminari'
|
||||
|
||||
s.add_dependency 'haml', '3.1.2'
|
||||
s.add_dependency 'sass', '3.1.2'
|
||||
|
@ -52,7 +52,8 @@ describe Locomotive::Liquid::Tags::Paginate do
|
||||
{},
|
||||
{
|
||||
'projects' => options.has_key?(:collection) ? options[:collection] : PaginatedCollection.new(['Ruby on Rails', 'jQuery', 'mongodb', 'Liquid', 'sqlite3']),
|
||||
'current_page' => options[:page] || 1
|
||||
'current_page' => options[:page] || 1,
|
||||
'path' => '/'
|
||||
}, {
|
||||
:page => FactoryGirl.build(:page)
|
||||
}, true)
|
||||
|
Loading…
Reference in New Issue
Block a user