pjax_rails 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pjax.rb +2 -2
- metadata +1 -1
data/lib/pjax.rb
CHANGED
@@ -5,6 +5,8 @@ module Pjax
|
|
5
5
|
layout proc { |c| pjax_request? ? pjax_layout : 'application' }
|
6
6
|
helper_method :pjax_request?
|
7
7
|
|
8
|
+
rescue_from Pjax::Unsupported, :with => :pjax_unsupported
|
9
|
+
|
8
10
|
before_filter :strip_pjax_param, :if => :pjax_request?
|
9
11
|
before_filter :set_pjax_url, :if => :pjax_request?
|
10
12
|
end
|
@@ -12,8 +14,6 @@ module Pjax
|
|
12
14
|
class Error < StandardError; end
|
13
15
|
class Unsupported < Error; end
|
14
16
|
|
15
|
-
rescue_from Pjax::Unsupported, :with => :pjax_unsupported
|
16
|
-
|
17
17
|
protected
|
18
18
|
def pjax_request?
|
19
19
|
env['HTTP_X_PJAX'].present?
|