How to generate a model serializer using active_model_serializer gem

If you are using the active_model_serializer gem, you can gen­er­ate Model seri­al­iz­ers using the fol­low­ing command.

rails generate serializer <model_name>
# e.g.
rails generate serializer user

Ryan Sukale

Ryan is a UX engineer living in San Francisco, California.

You may also like...