Created
April 17, 2012 05:42
-
-
Save cespare/2403743 to your computer and use it in GitHub Desktop.
array of partials
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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