{"number":1,"pull_request":{"number":1,"issue_url":"https://github.com/geoffd123/amos/issues/1","head":{"label":"itkin:master","repo":{"master_branch":null,"name":"amos","created_at":"2011-10-11T14:20:24Z","size":112,"clone_url":"https://github.com/itkin/amos.git","private":false,"updated_at":"2011-10-12T16:16:28Z","watchers":1,"ssh_url":"git@github.com:itkin/amos.git","url":"https://api.github.com/repos/itkin/amos","git_url":"git://github.com/itkin/amos.git","language":"JavaScript","fork":true,"svn_url":"https://svn.github.com/itkin/amos","id":2555750,"pushed_at":"2011-10-12T16:16:28Z","open_issues":0,"homepage":"","description":"A Model Only Server","forks":0,"html_url":"https://github.com/itkin/amos","owner":{"avatar_url":"https://secure.gravatar.com/avatar/982f2b4f810eba6f74a78f1a3b366abd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"982f2b4f810eba6f74a78f1a3b366abd","url":"https://api.github.com/users/itkin","id":115818,"login":"itkin"}},"sha":"3ddcfad2fa281f22295d52f6105562712b9493f4","ref":"master","user":{"avatar_url":"https://secure.gravatar.com/avatar/982f2b4f810eba6f74a78f1a3b366abd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"982f2b4f810eba6f74a78f1a3b366abd","url":"https://api.github.com/users/itkin","id":115818,"login":"itkin"}},"merged_by":{"avatar_url":"https://secure.gravatar.com/avatar/1e822d47fc810a87534dd3f1e9f5e1fd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1e822d47fc810a87534dd3f1e9f5e1fd","url":"https://api.github.com/users/geoffd123","id":277623,"login":"geoffd123"},"created_at":"2011-10-12T16:44:34Z","changed_files":9,"merged":true,"body":"here is the pullrequest, in few words : \r\n\r\n- 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...\r\n\r\n- all the incoming params 1°) get underscorized, 2°) associations keys are replaced by \"association_attributes\"  in order to access to rails standard associations setters\r\n\r\n- all the output data get camelized & index action send back a count statistics. \r\n\r\n- 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. \r\n\r\n- 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...:-) ).     \r\n\r\n- 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 ). \r\n\r\n... and i think that's all from my side ... have you think about how to handle a cache strategy ? \r\n\r\n","comments":0,"title":"itkin fork pull request","additions":173,"diff_url":"https://github.com/geoffd123/amos/pull/1.diff","updated_at":"2011-10-13T16:37:13Z","url":"https://api.github.com/repos/geoffd123/amos/pulls/1","id":397430,"patch_url":"https://github.com/geoffd123/amos/pull/1.patch","mergeable":null,"merged_at":"2011-10-13T16:37:13Z","commits":8,"closed_at":"2011-10-13T16:37:13Z","user":{"avatar_url":"https://secure.gravatar.com/avatar/982f2b4f810eba6f74a78f1a3b366abd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"982f2b4f810eba6f74a78f1a3b366abd","url":"https://api.github.com/users/itkin","id":115818,"login":"itkin"},"deletions":132,"html_url":"https://github.com/geoffd123/amos/pull/1","base":{"label":"geoffd123:master","repo":{"master_branch":null,"name":"amos","created_at":"2011-09-30T05:48:17Z","size":25636,"clone_url":"https://github.com/geoffd123/amos.git","private":false,"updated_at":"2011-10-13T16:37:12Z","watchers":5,"ssh_url":"git@github.com:geoffd123/amos.git","url":"https://api.github.com/repos/geoffd123/amos","git_url":"git://github.com/geoffd123/amos.git","language":"JavaScript","fork":false,"svn_url":"https://svn.github.com/geoffd123/amos","id":2487288,"pushed_at":"2011-10-13T16:37:12Z","open_issues":0,"homepage":"","description":"A Model Only Server","forks":2,"html_url":"https://github.com/geoffd123/amos","owner":{"avatar_url":"https://secure.gravatar.com/avatar/1e822d47fc810a87534dd3f1e9f5e1fd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1e822d47fc810a87534dd3f1e9f5e1fd","url":"https://api.github.com/users/geoffd123","id":277623,"login":"geoffd123"}},"sha":"a7dce6452fbf16589d2553bd5992fa875e9171e5","ref":"master","user":{"avatar_url":"https://secure.gravatar.com/avatar/1e822d47fc810a87534dd3f1e9f5e1fd?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"1e822d47fc810a87534dd3f1e9f5e1fd","url":"https://api.github.com/users/geoffd123","id":277623,"login":"geoffd123"}},"state":"closed"},"action":"closed"}