Created
October 22, 2015 20:37
-
-
Save fosterdill/ec498207ec450ad0a900 to your computer and use it in GitHub Desktop.
some random bullshit
This file contains hidden or 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 HtmlPage | |
def self.matches?(request) | |
request.env['CONTENT_TYPE'] == 'text/plain' | |
end | |
end | |
Rails.application.routes.draw do | |
get '/me', to: 'home#me', defaults: { format: 'json' }, as: :profile | |
constraints HtmlPage do | |
get '*path', to: 'home#index' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment