Skip to content

Commit

Permalink
conditional for empty events
Browse files Browse the repository at this point in the history
  • Loading branch information
ckundo committed Oct 27, 2011
1 parent 149ba1e commit 68be650
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions app/views/communities/index.html.haml
Expand Up @@ -2,18 +2,19 @@
= render :partial => 'search'
#events
- @communities.each do |community|
.community
%h3= "#{community.city}, #{community.state}"
%ul
- community.events.each do |event|
%li.event
%strong.time= event.start_time.strftime("%m/%d/%y")
.details
= link_to event.description, event.meetup_url, :class => 'description'
%em.status
%span.timestamp{:value => event.start_time}
%span.formatted-time -
- unless community.events.empty?
.community
%h3= "#{community.city}, #{community.state}"
%ul
- community.events.each do |event|
%li.event
%strong.time= event.start_time.strftime("%m/%d/%y")
.details
= link_to event.description, event.meetup_url, :class => 'description'
%em.status
%span.timestamp{:value => event.start_time}
%span.formatted-time -
.clear
.info
.feeds
.clear
.info
.feeds
.clear

0 comments on commit 68be650

Please sign in to comment.