Skip to content

Instantly share code, notes, and snippets.

@thomasv314
Forked from acidtib/gist:3489766
Created August 27, 2012 15:59
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 thomasv314/3489806 to your computer and use it in GitHub Desktop.
Save thomasv314/3489806 to your computer and use it in GitHub Desktop.
explore view
<% @towns.each do |town| %>
<div>
<%= town.town %> -
<%= town.postcards.last.eat %>
</div>
<% end %>
def explore
@states = State.find(params[:id])
@towns = @states.towns.find_all
@towns.each do |t|
t.postcards.last
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment