lib/pjax.rb in pjax_rails-0.3.4 vs lib/pjax.rb in pjax_rails-0.4.0
- old
+ new
@@ -1,10 +1,10 @@
module Pjax
extend ActiveSupport::Concern
included do
- layout proc { |c| pjax_request? ? pjax_layout : 'application' }
+ layout proc { |c| pjax_request? ? pjax_layout : nil }
helper_method :pjax_request?
rescue_from Pjax::Unsupported, :with => :pjax_unsupported
before_filter :strip_pjax_param, :if => :pjax_request?
@@ -14,10 +14,10 @@
class Error < StandardError; end
class Unsupported < Error; end
protected
def pjax_request?
- env['HTTP_X_PJAX'].present?
+ request.env['HTTP_X_PJAX'].present?
end
def pjax_layout
false
end