Skip to content

Commit

Permalink
keep compatibility with previous versions for now
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed May 25, 2012
1 parent e79935c commit 8ca1a41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/kaminari/helpers/paginator.rb
Expand Up @@ -23,6 +23,8 @@ def initialize(template, options) #:nodoc:
@template, @options = template, options
@theme = @options[:theme] ? "#{@options[:theme]}/" : ''
@options[:current_page] = PageProxy.new @window_options.merge(@options), @options[:current_page], nil
#FIXME for compatibility. remove num_pages at some time in the future
@options[:num_pages] = @options[:total_pages]
# initialize the output_buffer for Context
@output_buffer = ActionView::OutputBuffer.new
end
Expand Down
2 changes: 2 additions & 0 deletions lib/kaminari/models/page_scope_methods.rb
Expand Up @@ -18,6 +18,8 @@ def padding(num)
def total_pages
(total_count.to_f / limit_value).ceil
end
#FIXME for compatibility. remove num_pages at some time in the future
alias num_pages total_pages

# Current page number
def current_page
Expand Down

0 comments on commit 8ca1a41

Please sign in to comment.