geoffd123/amos — pull request #1 by itkin (2011-10-12 16:44:34+00:00)
Title: itkin fork pull request

here is the pullrequest, in few words :

- the index action call a list class method (added to AR::Base on init, overridable by users). All the params which are not identified as specific are passed to this method. Overriding this method should allow to customize the search, eager load some associations, etc...

- all the incoming params 1°) get underscorized, 2°) associations keys are replaced by "association_attributes" in order to access to rails standard associations setters

- all the output data get camelized & index action send back a count statistics.

- User can define a "default" serialization per model, using the as_json AR class methods. But they can also straightly override the as_json instance method fo each model.

- In as_json, including an association without any options load the "default" assoc serialized instance, as it has been defined in the associated model (i'm not sure to be clear here...:-) ).

- I left the "fields" params to allow to choose which attributes should be rendered from client-side ( should work if params[:field] == { :only => 'name'} for exemple ).

... and i think that's all from my side ... have you think about how to handle a cache strategy ?