Browse files

Allow pjax_layout to be overriden

  • Loading branch information...
1 parent 0be3483 commit c0dcc1d454f497e281606f78664384e48603c031 @josh josh committed Feb 22, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/pjax.rb
View
7 lib/pjax.rb
@@ -2,10 +2,15 @@ module Pjax
extend ActiveSupport::Concern
included do
- layout proc { |c| pjax_request? ? false : 'application' }
+ layout proc { |c| pjax_request? ? pjax_layout : 'application' }
helper_method :pjax_request?
end
+ protected
+ def pjax_layout
+ false
+ end
+
private
def redirect_pjax_to(action, url = nil)
new_url = url_for(url ? url : { action: action })

0 comments on commit c0dcc1d

Please sign in to comment.