lib/active_groonga/result_set.rb in activegroonga-2.1.1 vs lib/active_groonga/result_set.rb in activegroonga-2.1.2
- old
+ new
@@ -236,11 +236,15 @@
define_method(method_name) do
@records.send(method_name)
end
end
- # For kaminari.
- alias_method :num_pages, :n_pages
+ # For Kaminari.
alias_method :limit_value, :page_size
+ ## For Kaminari >= 0.14.0.
+ alias_method :total_pages, :n_pages
+ ## For Kaminari < 0.14.0.
+ ## TODO: Remove me when old Kaminari support is dropped.
+ alias_method :num_pages, :n_pages
end
end
end