objectreload-pagination 0.1.8 → 0.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/pagination.rb +4 -1
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.8
1
+ 0.1.9
data/lib/pagination.rb CHANGED
@@ -20,5 +20,8 @@ ActionController::Base.send :include, RescueWithHelper
20
20
  ActionController::Base.send(:rescue_from, Pagination::InvalidPage, :with => :not_found)
21
21
 
22
22
  def not_found
23
- render_optional_error_file 404
23
+ # Avoid calling '304 Not Modified'
24
+ if stale?(:etag => "invalid_page", :last_modified => DateTime.now.utc)
25
+ render_optional_error_file 404
26
+ end
24
27
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 8
9
- version: 0.1.8
8
+ - 9
9
+ version: 0.1.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mateusz Drozdzynski
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-07-05 00:00:00 +03:00
17
+ date: 2010-07-08 00:00:00 +03:00
18
18
  default_executable:
19
19
  dependencies: []
20
20