RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

Rails API Pattern for Complex Collections

One of the patterns I've been using when building restful APIs is creating a model for collections. This model then uses a factory method for instantiating from a set of params. I've found this cleans up controllers significantly and creates a nice place for tests to hang off of. I've written a blog post about this building complex collections from params pattern.

Comments

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!