YahooArchive / mojito

[archiving soon] Yahoo! Mojito Framework
BSD 3-Clause "New" or "Revised" License
1.57k stars 214 forks source link

please document use of meta completely, especially on serialize: 'json' #927

Closed yukinying closed 11 years ago

yukinying commented 11 years ago

Making mojito to speak restful services is extremely useful for real world applications. When I am trying to hack mojito to do that, I dig into the source code and realized it is already there. It is as easy as this:

 ac.done( data, { serialize: 'json' } );

I may have mistaken that it has already been documented, but if not, why don't we document that as it is a very good showcase of usage of mojito for building complex application !

rwaldura commented 11 years ago

@yukinying thanks for the report. Indeed meta is a bit a of magic that's somewhat obscure.

rwaldura commented 11 years ago

Let's flesh out http://developer.yahoo.com/cocktails/mojito/api/classes/ActionContext.html#method_done

http://developer.yahoo.com/cocktails/mojito/docs/intro/mojito_mvc.html#specifying-the-view mentions you can specify a view, but it's sparse.

@zhouyaoji I notice the link http://developer.yahoo.com/cocktails/mojito/api/files/node_modules_mojito_lib_app_autoload_action-context.common.js.html#l388 from http://developer.yahoo.com/cocktails/mojito/api/classes/ActionContext.html#method_done is broken?

zhouyaoji commented 11 years ago

Thanks for catching that, @rwaldura. I've fixed the problem.

rwaldura commented 11 years ago

resolved fixed

yukinying commented 11 years ago

Just taking some time digging out what is fixed. The use of meta with serialize:json is still not appearing in documentation. Maybe I have overlooking something?

caridy commented 11 years ago

/ping @zhouyaoji