Skip to content
Browse files

avoid "instance variable @_default_per_page not initialized" warning

  • Loading branch information...
1 parent 7cb1827 commit eaca75ec7fbfdca9b565ab5d5fd2e3604f9f3779 @amatsuda committed Feb 14, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/kaminari/models/configuration_methods.rb
View
2 lib/kaminari/models/configuration_methods.rb
@@ -13,7 +13,7 @@ def paginates_per(val)
# This model's default +per_page+ value
# returns +default_per_page+ value unless explicitly overridden via <tt>paginates_per</tt>
def default_per_page
- @_default_per_page || Kaminari.config.default_per_page
+ @_default_per_page ||= Kaminari.config.default_per_page
end
end
end

0 comments on commit eaca75e

Please sign in to comment.
Something went wrong with that request. Please try again.