Created
September 15, 2015 16:58
-
-
Save clalimarmo/6d8cefaa339353dc40bf to your computer and use it in GitHub Desktop.
Deep Linking with React + Flux, example Rails routes definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ExcludeXhr | |
def matches?(request) | |
!request.xhr? | |
end | |
end | |
Rails.application.routes.draw do | |
constraints(ExcludeXhr.new) do | |
root 'home#index' # home/index just renders our single page client-side app | |
get '*path', to: "home#index", via: :all | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment