Week1a_2014-05-11

SimplyElectricity - Breakdown by General, Routing, and MVC:


----------------------
----- General --------
----------------------

Fork and Clone Repo - create ZMM_Tech branch

Rename App Remove all references to Pinterestly and change to "SimplyElectricity"


----------------------
----- Routing --------
----------------------

 - Home Page
	Create 'Home Page' independent of Devise-Reg-New

unauthenticated_root GET    /                              pages#home


--------

Post-Register / Login takes user to Thank You, as before

root GET    				/                              pages#thankyou

	At some later point, you may want users to be able to "log in" and see their plan, etc.  In this case we can create a Devise / Password setup, and a 'logged-in home' that displays per-user specific info.


----------------------

 - Create resources :users	so admin has way to manage users

	"rake routes" (in console) now shows these new routes, to support admin-mgmt of users

           users GET    /users(.:format)               users#index
       edit_user GET    /users/:id/edit(.:format)      users#edit
            user GET    /users/:id(.:format)           users#show
                 PATCH  /users/:id(.:format)           users#update
                 PUT    /users/:id(.:format)           users#update
                 DELETE /users/:id(.:format)           users#destroy


----------------------
----- Model/DB -------
----------------------

	- Model - User
		Added 'has one' relationship to Zips table.

	- DB 
		Add more fields for user-data
		Add index on email specifying unique


----------------------
--- Controllers ------
----------------------


	Create Default Users controllers for users management

	Modify Application Controller to allow for more user-fields 
		( Rails4 StrongParameters changes this from Rails3 )

	Modify Pages Controller to add Zips lookup and remove users list
	

----------------------
------ Views ---------
----------------------


	Copy existing home-page-partial into Home page

	Put zipcode-entry partial on new Home page

	Devise-Reg-New
		Three outcomes - choice in TX, choice not Tx, No Choice
		Reflected in if/then Verbage and Form-fields within Partial shown
		 - those with TX choice asked for more info
		 - will add 'submit bill' to this page

---------------