This project is archived and is in readonly mode.
[Patch] Metals should be loaded from Engines
Reported by MatthewRudy | February 22nd, 2009 @ 08:18 PM | in 2.x
I'd like to bundle a simple "/backlog" request to my RudeQueue plugin (http://github.com/matthewrudy/ru...
and I'd like to do it as a metal
class RudeQueue::Backlog
def self.call(env)
if env["PATH_INFO"] =~ /^\/backlog/
[200, {"Content-Type" => "text/html"}, [RudeQueue.backlog.to_s]]
else
[404, {"Content-Type" => "text/html"}, ["Not Found"]]
end
end
end
it seems to make sense,
however Engines don't currently load their Metal.
Here's my fork which fixes that http://github.com/matthewrudy/ru...
and a patch is also attached.
Any suggestions on how to better format the code, or manage the paths is very much welcome. (notably it seems to be very hard to test in code... I've tested it manually)
Comments and changes to this ticket
-
DHH February 27th, 2009 @ 01:33 PM
- Assigned user set to josh
-
Repository February 27th, 2009 @ 01:43 PM
- State changed from new to committed
(from [319106d09c0ec2daf8b5345f525f1c97b6368ce2]) Metal can now line in plugins under app/metal [#2045 state:committed]
Signed-off-by: David Heinemeier Hansson david@loudthinking.com http://github.com/rails/rails/co...
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>
Attachments
Referenced by
- 2045 [Patch] Metals should be loaded from Engines (from [319106d09c0ec2daf8b5345f525f1c97b6368ce2]) Metal c...