Skip to content

Commit 198582b

Browse files
committed
second heroku commit
1 parent a2d68cb commit 198582b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

app/controllers/application_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
class ApplicationController < ActionController::API
3-
3+
def fallback_index_html
4+
render :file => 'public/index.html'
5+
end
46

57

68
def index

config/routes.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
resources :managers
1313
resources :companies
1414

15-
15+
get '*path', to: "application#fallback_index_html", constraints: ->(request) do
16+
!request.xhr? && request.format.html?
17+
end
1618

1719
end
1820
end

0 commit comments

Comments
 (0)