Skip to content

Instantly share code, notes, and snippets.

@zeitan
Created August 1, 2012 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeitan/3230333 to your computer and use it in GitHub Desktop.
Save zeitan/3230333 to your computer and use it in GitHub Desktop.
json.(collection, :id, :name)
json.array!(@collections) do |json, collection|
json.partial! partial: 'collection', locals: { collection: collection }
json.id collection.id
json.name collection.name
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment