Skip to content

Commit

Permalink
Don't cache next page when the more button doesn't exists
Browse files Browse the repository at this point in the history
  • Loading branch information
srosa committed Aug 10, 2015
1 parent c2a1b8a commit a0d9207
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/assets/javascripts/neat_pages/more_button.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ class NeatPagesMoreButton

return false

if $('#neat-pages-ajax-wrapper').length != 0 then @cachePage()
if $('#neat-pages-ajax-wrapper').length and $('#neat-pages-more-button').length
@cachePage()


buildURL: () ->
Expand Down
2 changes: 1 addition & 1 deletion neat-pages.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Gem::Specification.new do |gem|
gem.description = "A simple pagination API to paginate ActiveRecord and Mongoid Models."
gem.summary = "A simple pagination API to paginate ActiveRecord and Mongoid Models."
gem.homepage = "https://github.com/alchimikweb/neat-pages"
gem.version = "1.0.5"
gem.version = "1.0.6"
gem.licenses = ["MIT"]

gem.authors = ["Sebastien Rosa"]
Expand Down

0 comments on commit a0d9207

Please sign in to comment.