In Rails 4, strong_parameters allows the controller to filter out what is accessible so that you have to make a conscious choice about what parameters to allow to be updated.
And serialization options were too hash-y, then projects like RABL came about to try to avoid having to define as_json or having specific JSON, etc. view that was a little nasty looking and not very easy, so then ActiveModel::Serializer was written to let you define what equates an abstract view by defining something that looks a lot like a model class.
In other words, for one or more uses of a model or collection of models you’d have some way of defining what attributes and associations are both serialized and accepted for writes, which were serialize-only, and which were writable.
The goal also would be to hopefully not have to define yet another class or template to designate this definition if not desired (but I guess you could if you wanted), but at the least to be able to have a single place to define both of these if you want, so you aren’t having to enter the same attribute name in both strong_parameters and in the serializer.
Locally, we are starting to use AngularJS for client-side development served by Rails 3.2.x because we didn’t want something that was purely just for services, even if for Angular most of what is required other than auth, etc. is just a number of JSON services. (Nothing against Ember- we also think it looks great, as do a number of other existing and up-and-coming solutions for client-side.) So, we have a project that was kind of born out of a spike (hence it having been previously unstable, non-working, and the only test file in it is beyond irrelevant at this point) to just attempt to provide something that helps us more quickly integrate with the models I originally generated using a script I wrote from a legacy DB that has a moderately complex schema. The project is here:
Thanks in advance for any advice and thoughts on this.