chicktechorg/chicktech — pull request #22 by dustinbrownman (2013-11-22 18:40:33+00:00)
Title: Leader commitments

This will add some logic to let us display all of the commitments for a user. Our goal is to display all the events in which a user has a commitment. The challenge was there are four types of commitments a user has that makes that possible.
* User is leading the event
* User is leading a team in the event
* User has a job within the event
* User has a job within a team within the event

I added multiple associations between users and events, directed through those four different paths (maybe could use some refactoring here) in order to pull out all the unique events associated with a user.

I then added logic to events and teams that would allow you to pull out all the jobs/leadership_roles within an event/team that are associated with a passed in user. While this feels a little big hacky, my choice was between this, or logic in the view. I'm definitely open to suggestions on that.