Skip to content

Instantly share code, notes, and snippets.

@sushant12
Created June 2, 2017 09:07
Show Gist options
  • Save sushant12/e37c2dc0f5e188e18cfa2acf7c5a31a4 to your computer and use it in GitHub Desktop.
Save sushant12/e37c2dc0f5e188e18cfa2acf7c5a31a4 to your computer and use it in GitHub Desktop.
render home view when user visits /
module Todo
class Application
include TemplateView
class << self
def call(env)
if(env[‘PATH_INFO’] == ‘/’)
view = TemplateView.home_view
end
end
end
end
end
use Rack::CommonLogger
use Rack::ContentLength
run Todo::Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment