tansaku/LocalSupport — pull request #134 by johnnymo87 (2013-12-03 17:08:19+00:00)
Title: Custom 404 Error Page

[Pivotal Tracker feature](https://www.pivotaltracker.com/story/show/60838900)
* Pages controller acts as catch-all, handling request if no other route matches.
* `show` method receives the URL as `params[id]`.
* interpreting `id` as a permalink, `show` method queries `Page` table in database for a static page, if none is found, queries table for custom 404 page (which will crash the app if `rake db:pages` hasn't been run to populate the database with the required pages).
* if the custom 404 error page is being returned, the status code is adjusted to 404.
* the custom 404 error page is rendered inside the usual body layout
* testing coverage: cuke feature, rspec tests for controller.