Skip to content

Instantly share code, notes, and snippets.

@cespare
Created April 17, 2012 05:42
Show Gist options
  • Save cespare/2403743 to your computer and use it in GitHub Desktop.
Save cespare/2403743 to your computer and use it in GitHub Desktop.
array of partials
# In your app
get "/whatever"
erb :_partial_collection, :layout => false, :locals => { partials => partials } # partials is an array of other partials...
end
# in views/_partial_collection.erb
<% partials.each { |partial| %><%= erb partial, :layout => false %><% } %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment