Skip to content

Instantly share code, notes, and snippets.

@snelson
Created December 19, 2015 04:51
Show Gist options
  • Select an option

  • Save snelson/e1c763c3660071a0a641 to your computer and use it in GitHub Desktop.

Select an option

Save snelson/e1c763c3660071a0a641 to your computer and use it in GitHub Desktop.

Revisions

  1. Scotty Nelson renamed this gist Dec 19, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. Scotty Nelson created this gist Dec 19, 2015.
    9 changes: 9 additions & 0 deletions pjax_headers.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    class ApplicationController < ActionController::Base
    layout :determine_layout

    private

    def determine_layout
    request.headers['X-PJAX'] ? false : "application"
    end
    end