NUBIC/LatticeGrid — pull request #4 by Adorack (2012-05-22 13:50:24+00:00)
Title: Fix for caching and pagination link problems.

I found two bugs:

- From the LatticeGrid home page (/abstracts/current), clicking on "no pagination" results in a 404.
- From the LatticeGrid home page, clicking on pages other than the first one (for example, /abstracts/2012/current/10) results in a page hit that is not cached. We're running a rather underpowered server, so this is a fairly significant difference for us.

Both of these issues stem from the fact that /abstracts/current effectively is an identical view onto the /abstracts/(current_year)/year_list pages.

I attached a commit that fixes this by making /abstracts/current a redirect page to the current year list:

- Change index.html to redirect JavaScript-enabled users directly to the right page. Without JS, they pass through the (slower) Ruby redirect page.
- Override `current_abstracts_url` to point directly to the year list.
- Change `AbstractController#current` to a redirect page.
- Caching for "/abstracts/current" is no longer necessary.