On Thu, Oct 18, 2007 at 02:11:24PM -0400, Stephen Caudill wrote:
> in the case of a rendered template, you do end up with a win though:
>
> class MyController
> provides :html
> def index
> provides :json, :yaml
> end
> end
>
> vs.
>
> class MyController
> def index
> respond_to do |format|
> format.html
> format.json
> format.yaml
> end
> end
> end
But in that simple case, couldn't you just match the format to the template
extension automatically?
That is,
format.foo { ... }
tells you how to render a foo request, but if not specified, it defaults to
render action.rfoo
The 'provides' would be implied by the existence of the template with the
right extension.
B.
_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel