carlsednaoui / nycio

NYC Tech Volunteer Database
6 stars 2 forks source link

Occurrence Show vs Event Show #36

Open mattjstar opened 10 years ago

mattjstar commented 10 years ago

Right now we have the event show pages linking from the home page, we might want those to be Occurrence show pages as the list on the home page will be occurrences, not events.

carlsednaoui commented 10 years ago

That's a great idea! we can crank that out once we've added the occurrence logic in :100:

carlsednaoui commented 10 years ago

After thinking about this further, I think it'll be cleaner to keep it the way we have it — this will ensure that recurring events don't pollute the interface. Closing for now :)

mattjstar commented 10 years ago

That's fine, we just have to figure out how we want Occurrences to show up in the home view for each event. We could write a quick class method/scope for occurrences very similar to the with_future_occurrences method that selects only the future occurrences for that event, and outputs only the one that's closest to happening.

It's up to you if you want to reopen this as an issue...

carlsednaoui commented 10 years ago

Right now the app is supposed to primarily show the next instance of an event, and then other instances are listed at the bottom of the event show page. For the index page, I think it's better to only show each event once (v.s. it's many occurrences)

mattjstar commented 10 years ago

Yeah I agree. I was talking about this though in views/pages/home.html.erb

<p><%= Occurrence.find_by_event_id(event.id).start_time.strftime('%A, %b %d') %>: 
<%= Occurrence.find_by_event_id(event.id).start_time.strftime('%I:%M %p') %> - 
<%= Occurrence.find_by_event_id(event.id).end_time.strftime('%I:%M %p') %></p>

Right now you're just finding an occurrence with that event ID. We should have some sort of intelligence that automatically outputs the upcoming occurrence that is most recent.

carlsednaoui commented 10 years ago

Good call, re-opening