Answer the question
In order to leave comments, you need to log in
What is the correct way to use ActiveModel::Serializer in a "nested" array in RoR?
With this rendering format json Serializer works.
respond_to do |format|
format.html
format.json { render json: @company }
end
respond_to do |format|
format.html
format.json { render json: { company: @company, meta: { current_page: @company.current_page } } }
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question