Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 9b0ff04e62
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (17 sloc) 0.612 kb
%w(action_controller/railtie coderay).map &method(:require)
run TheSmallestRailsApp ||= Class.new(Rails::Application) {
config.secret_token = routes.append { root to: 'hello#world' }.inspect
initialize!
}
class HelloController < ActionController::Base
def world
render inline: "
<!DOCTYPE html>
<title>The Smallest Rails App</title>
<h3>I am the smallest rails app!</h3>
<p>Here is my source code:</p>
#{CodeRay.scan_file(__FILE__, :ruby).div(line_numbers: :table)}
<a href='https://github.com/artemave/thesmallestrailsapp.com'>Make me smaller</a>
"
end
end
Jump to Line
Something went wrong with that request. Please try again.