I'm trying to set up a JSON object that I can make a clone of, so I need Jbuilder to list all object attributes and associations. I've done plenty of pick and choose JSON structures using Jbuilder, but can't seem to find a simple way to just list everything in one swoop without explicitly declaring it all.
This works fine for individual company
attributes and all associated location
attributes...
//show.json.jbuilder
company = @company
json.company do
json.(company, :id)
json.locations_attributes company.locations
end
But I'd like to include ALL the company
attributes and can't seem to do it without listing them all json.(company, :id, :name, :line_of_business)
etc.