http://merb.devjavu.com/changeset/795

crossing_fingers.do
  ::Manually.refactor_controllers
  views.each {|v| mv "#{v.name}.#{v.extension}"
"#{v.name}.#{v.format}.#{v.extension}"}
end

I got one controller refactored, and the html format didn't break yet,
so we'll see how the :xml and :json formats go.


On 10/18/07, Brian Candler <[EMAIL PROTECTED]> wrote:
> 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
>


-- 
Cheers,

Kevin Williams
http://kevwil.com/
http://www.almostserio.us/
http://kevwil.jaiku.com/
_______________________________________________
Merb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/merb-devel

Reply via email to