Displaying 3 results from an estimated 3 matches for "active_model_serializers".
2012 Oct 01
1
active_model_serializers, more than one level deep of associations, specifying serializers per association
I am assuming this an appropriate place to discuss this, but if it isn''t my
apologies- just let me know. Just a Rails 4-ish thing.
Am attempting to pull AMS (active_model_serializers), strong_parameters,
and the "permitter" strategy that Adam Hawkins is using:
http://broadcastingadam.com/2012/07/parameter_authorization_in_rails_apis/
Code so far is here (in the integrate-twinturbo_strategy_for_param_authr
branch if you clone):
https://github.com/garysweaver/restful...
2012 Sep 28
1
How to Include Associations in #as_json
Hi,
Does anyone know how to include nested associations when overriding a
model''s #as_json method?
Below is my attempt to include direct and nested associations.
NOTE: "office" is a direct association, "company" is nested association
via "office". I''d like both included in the generated json output.
def as_json(options={})
super(:include
2012 Sep 15
10
Versioning of Views; Our Approach
My friend Ben Willis and I have developed a gem for the versioning of Rails
views.
https://github.com/bwillis/versioncake
The versioning is done by the naming convention. Image the following
series of files :
show.v3.json.jbuilder
show.v2.json.jbuilder
show.v1.json.jbuilder
create.v2.json.jbuilder
create.v1.json.jbuilder
The developer pre-defines all view versions in their config. When a