dailypenn / eventsatpenn

Penn campus events aggregation website with Facebook integration
0 stars 0 forks source link

Add search and filter by category functionality on events and orgs list pages #7

Closed alexwgraves closed 7 years ago

alexwgraves commented 7 years ago

Uses the filterrific gem (https://github.com/jhund/filterrific). This should be able to used for the homepage as well (with a little more work) when we want to filter the events that display on the calendar by category.

I added a self.categories method in the event and org models, which I think is what we should use for categories. Both of them are currently populated with a random list of categories that I used for testing.

I'm not entirely certain if the way I added the sorting into the events index method is correct. I wasn't exactly sure what you were doing in the if statement, so I just put it in the else so as not to mess with that stuff. I'm guess it should probably go in both, but if let me know what that if statement is supposed to be doing, we can determine exactly how the two should work together.