Top "Active-model-serializers" questions

objects.

Test ActiveModel::Serializer classes with Rspec

Given the following ActiveModel::Serializer class: class SampleSerializer < ActiveModel::Serializer attributes :id, :name end How can this be tested …

ruby-on-rails ruby-on-rails-4 rspec active-model-serializers
jbuilder vs rails-api/active_model_serializers for JSON handling in Rails 4

I have started to begin with Rails 4. While working with handling of JSON format data, I found we can use …

ruby-on-rails ruby ruby-on-rails-4 active-model-serializers jbuilder
Rails active_model_serializer with pagination

I'm using active_model_serializer. Now I want to serialize an object with pagination, should I do the pagination logic …

ruby-on-rails serialization pagination active-model-serializers
active_model_serializers not working in rails-api

I have been looking around a lot and have not found a solution. I have a rails-API application and simple …

ruby-on-rails-4 active-model-serializers rails-api
ActiveModel Serializers: How do I serialize a resource collection?

I have a bookmarks resource and have mapped it to serve json by default under my api namespace like so …

ruby-on-rails json api active-model-serializers
Use active_model_serializer with a non-ActiveRecord object

I have a model object that is not descended from ActiveRecord::Base and is not stored in the database. I …

ruby-on-rails-3.2 active-model-serializers
JSON rendering with activemodel serializer in Rails

I just wonder how the rails render the model objects with activemodel-serializer in JSON. I installed activemodel-serializer but the output …

ruby-on-rails json active-model-serializers
How to sort Rails Active Model serializers' response

Weirdly, I haven't find anything on the subject... How can I sort the JSON my Rails server delivers? I am …

ruby-on-rails active-model-serializers
Ember.js current_user - accessing global variable from controller

I am baffled by a seemingly simple ember question. I am using active_model_serializers meta data serialization to serialize …

ember.js ember-data active-model-serializers
Using a different key name for an association attribute in rails api active model serializer

I am building a Rest API using rails-api and active-model-serializer to easily filter the required fields in the JSON. I …

ruby-on-rails json active-model-serializers rails-api