> I'll make the patch to add these lines to the scaffold_resource generator.
Here's the ticket with patch:
http://dev.rubyonrails.org/ticket/8185
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core
> Voila. Now the HTML response and the XML response refer to the same
> object. The XML client gets the field names and types, and defaults
> for the field values to boot. And we didn't even have to touch the
> Rails core.
Another reason this is good is that default values for attributes (at
t
> # GET /foos/new
> # GET /foos/new.xml
> def new
> @foo = Post.new
>
> respond_to do |format|
> format.html # new.erb
> format.xml { render :xml => @foo.to_xml }
> end
> end
>
> Voila. Now the HTML response and the XML response refer to the same
> object. The XM
> Automatically generating a schema seems like overkill, given that the
> schema for your models changes rarely, what's wrong with just a human
> readable API doc page.
Because that's a lot of work, and a standard format makes that work
unneeded. The Beast forum doesn't need to publish an API do
> I'm not necessarily sold on the idea of generating a particular schema
> language, or even of generating a schema at all, but I do know that
> inventing our own is something we should be very wary of.
RelaxNG is a schema for *XML*, not for a *model*. This schema is only
indirectly used to con
> Okay. I see that my first patch was committed this morning (thanks
> DHH) so this is the next logical step. Note that by itself, this
> change enables nothing without a proper schema definition. Basically
> it would be trading a little bit of aesthetics (e.g., datetime for
> dateTime) for a l
rrent REST standard Rails is advocating? I think the most
interesting part of this is the XML format, and I'd really like to
form something the community agrees with as I construct a patch for
this.
-- Eric Mill
--~--~-~--~~~---~--~~
You received this message becaus