reshleman/craigstr — pull request #3 by reshleman (2014-08-05 01:17:57+00:00)
Title: Admins can add geographic regions ("locations")

Many of these changes are background work related to validating a user's admin status, plus the actual changes for adding locations.

Here's the overview:

* Create model and migration for locations
* Add route, controller, view, and partial for displaying a list of all locations (Locations#index)
* Create an AdminController which by default checks that a user is an admin
* Add namespaced routes and Admin::LocationsController to handle #new and #create actions (this controller inherits from AdminController, so only admin users can access it)
* Add admin/locations#new view
* Add links to the application layout for "Home" and "Sign Out"

https://trello.com/c/JdYZB41D

If anyone has questions about what the admin-related code is doing, comment on the lines that are unclear, or let me know tomorrow and I'll do my best to explain. The [Rails Guides](http://guides.rubyonrails.org/routing.html#controller-namespaces-and-routing) have a short explanation of namespaced routing as well.