Experimental plugin to add Rack-based after_filter functionality to ActionController
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
tasks
test
OBSOLETE
README
Rakefile
init.rb
install.rb
uninstall.rb

README



THIS PLUGIN HAS BEEN SUPERSEDED

by the per_action_mw (Per Action Middleware) plugin:

git://github.com/dblack/per_action_mw.git

Yes, it's all a moving target :-)


David Black



AfterMiddles
============

This is an experimental plugin to add a Rack-based after-filter-like layer
to ActionController. It requires Rails 2.3/edge. 

I've got the tests working as integration tests in an app on my machine.
They're a bit temperamental about working in the plugin directory itself, but
they pass.


Example
=======

You get an initialize method for free (@app = app).

  class MyRackApp
    def call(env)
      status, headers, response = @app.call(env)
      [status, headers, response]
    end
  end

  class ItemsController
    after_middle MyRackApp
  end

More information
================

The after_middle method is a wrapper around before_filter. It adds the
class you give it to an array, and then before the response is sent, the
array is turned into a middleware stack which is processed. 

Copyright (c) 2009 Ruby Power and Light, LLC. Released under the same terms
as Ruby itself.