keep compatibility with previous versions for now
This commit is contained in:
parent
e79935c2d5
commit
8ca1a41740
|
@ -23,6 +23,8 @@ module Kaminari
|
||||||
@template, @options = template, options
|
@template, @options = template, options
|
||||||
@theme = @options[:theme] ? "#{@options[:theme]}/" : ''
|
@theme = @options[:theme] ? "#{@options[:theme]}/" : ''
|
||||||
@options[:current_page] = PageProxy.new @window_options.merge(@options), @options[:current_page], nil
|
@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
|
# initialize the output_buffer for Context
|
||||||
@output_buffer = ActionView::OutputBuffer.new
|
@output_buffer = ActionView::OutputBuffer.new
|
||||||
end
|
end
|
||||||
|
|
|
@ -18,6 +18,8 @@ module Kaminari
|
||||||
def total_pages
|
def total_pages
|
||||||
(total_count.to_f / limit_value).ceil
|
(total_count.to_f / limit_value).ceil
|
||||||
end
|
end
|
||||||
|
#FIXME for compatibility. remove num_pages at some time in the future
|
||||||
|
alias num_pages total_pages
|
||||||
|
|
||||||
# Current page number
|
# Current page number
|
||||||
def current_page
|
def current_page
|
||||||
|
|
Loading…
Reference in New Issue