1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00

remove several trailing whitespaces

This commit is contained in:
Forrest Ye 2012-05-14 23:45:33 +08:00
parent 118927a42e
commit 6ad1e08e88
6 changed files with 9 additions and 9 deletions

View file

@ -14,7 +14,7 @@ module Kaminari::Helpers
alias included registered
end
class ActionViewTemplateProxy
def initialize(opts={})
@current_path = opts[:current_path]
@ -38,12 +38,12 @@ module Kaminari::Helpers
query = @current_params.merge(extra_params)
@current_path + (query.empty? ? '' : "?#{query.to_query}")
end
def params
@current_params
end
end
module HelperMethods
# A helper that renders the pagination links - for Sinatra.
#

View file

@ -7,7 +7,7 @@ module Kaminari
limit_value ? length : super
end
end
def current_page_count #:nodoc:
count
end

View file

@ -42,7 +42,7 @@ module Kaminari
def total_count
@_total_count || @_original_array.count
end
def current_page_count #:nodoc:
count
end

View file

@ -11,7 +11,7 @@ module Kaminari
def total_count #:nodoc:
embedded? ? unpage.count : count
end
def current_page_count #:nodoc:
# TODO: this needs a better fix, count comes from Mongoid::Context::Mongo or Enumerable which have different signatures
begin
@ -20,7 +20,7 @@ module Kaminari
count
end
end
private
def unpage
clone.tap do |crit|

View file

@ -3,7 +3,7 @@ require 'mongo_mapper'
require 'kaminari/models/mongo_mapper_extension'
describe Kaminari::MongoMapperExtension do
before do
begin
MongoMapper.connection = Mongo::Connection.new('localhost', 27017)

View file

@ -26,7 +26,7 @@ describe Kaminari::MongoidExtension do
end
describe '#page' do
context 'page 1' do
subject { MongoidExtensionDeveloper.page 1 }
it { should be_a Mongoid::Criteria }