http://plugins.ardes.com > response_for
= response_for
response_for (see Ardes::ResponseFor::ClassMethods) allows you to decorate the respond_to block of actions on sublcassed controllers. This works nicely with http://plugins.ardes.com/doc/resources_controller
=== Example
class FooController < ApplicationController
def index
@foos = Foo.find(:all)
end
def show
@foo = Foo.find(params[:id])
end
end
# this controller needs to respond_to fbml on index, and
# js, html and xml (templates) on index and show
class SpecialFooController < FooController
response_for :index do |format|
format.fbml { render :inline => turn_into_facebook(@foos) }
end
response_for :index, :show, :types => [:html, :xml, :js]
end
=== Specs and Coverage
* {SPECDOC}[link:files/SPECDOC.html] lists the specifications
* {RSpec Report}[link:rspec_report.html] is a report of spec pass/fails
* {RCov Report}[link:coverage/index.html] is the rcov report
=== Testing
RSpec is used for testing, so the tests are in spec/ rather than
test/ Do rake --tasks for more details.