michaelhayman / Reciprocity

http://stark-window-6749.heroku.com/
1 stars 0 forks source link

Let Volunteers register by default #29

Closed michaelhayman closed 12 years ago

michaelhayman commented 12 years ago

Record Volunteer's lng/lat in their table

Need to think about this; do we use the location they provide as a volunteer, or do we their record ip address? Either way, we consequently record long/lat in the volunteers

Volunteer belongs_to User User has_one Volunteer Volunteer belongs_to Location Location has_one Volunteer

don't even need to do this if we make volunteer have a location, since locations geocodes for address already.

Volunteers ->

geocoded_by :ip_address, :latitude => :lat, :longitude => :lon after_validation :geocode, :if => lambda{ |obj| obj.address_changed? }

/volunteers/new/ -> just like /opportunities/new

embed all user registration stuff init, i.e. username, email, password confirmation & pass it along.

Name Email Address Password

Optional information: Date of Birth Location

rails generate migration addlocationanddobtoVolunteers location_id:integer dob:date

don't make location attributes mandatory. store lng/lat for ip address if no address given.

Sign in stays the same, sign out too, just register changes.