ianwhite / response_for

response for lets you decorate your actions respond_to blocks

This URL has Read+Write access

response_for / CHANGELOG
100644 18 lines (13 sloc) 0.528 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
* response_for only kicks in once ActionController has got to the stage of
  performing an action.
  
    before_filter :bail_out
  
    def bail_out
      respond_to do |format|
        format.html { redirect_to :bail_out_place }
      end
    end
  
  The above code snippet bails out whatever the response_for, which I think is
  the least surprising behaviour.
  
  (This means that you can ignore the last changelog message for response_for,
  which has been deleted to avoid confusion)
  
* initial release of response_for