This project is archived and is in readonly mode.
Changeset [8c3a54366435eebc2c8aa63b63e1349ce74a7b38] by Joshua Peek
December 16th, 2008 @ 07:15 PM
Introduce Rails Metal
# app/metal/poller.rb class Poller < Rails::Rack::Metal
def call(env)
if env["PATH_INFO"] =~ /^\/poller/
[200, {"Content-Type" => "application/json"}, Message.recent.to_json]
else
super
end
end
end
-
There is a generator to help you get started
script/generate metal poller
-
Also, metal bits can be ran standalone with rackup
rackup app/metal/poller.rb
http://github.com/rails/rails/co...
Committed by Joshua Peek
- M railties/lib/initializer.rb
- M railties/lib/rails/rack.rb
- M railties/lib/rails/rack/metal.rb
- M railties/lib/rails_generator/generators/components/metal/USAGE
- M railties/lib/rails_generator/generators/components/metal/metal_generator.rb
- M railties/lib/rails_generator/generators/components/metal/templates/metal.rb
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>