|
Thanks for the link. Its good to see this being added to rails. My only nitpick is that I think you can do this in ActiveView, and not have to add extra code to the controller. As Jamis points out, the controller is doing the same thing whether its serving html, xhtml or xml. What's different is the template that gets rendered. It looks like Rails 1.1 provides this information via a new construct respond_to | wants, like this:
But why not just have active record pick the correct template? To
do this requires assigning template extensions to mime types. For
example, html goes to .rhtml, xml goes to .xml, xhtml goes to .rxhtml,
etc. This would be easy enough to do - in fact Rails is 99% of the way
there already. And it seems in line with Rails being opinionated
software. Once you make that assumption, ActiveView can do the rest of
the work. Of course, you should be able to override that choice in the
controller using the same mechanism Rails current supports. Anyway - for a working plugin that implements this approach see: http://cfis.savagexi.com/articles/2006/03/23/content-negotiation-and-rails Charlie Dr. Ernie Prabhakar wrote:
|
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________ microformats-rest mailing list [email protected] http://microformats.org/mailman/listinfo/microformats-rest
