scalableinternetservicesarchive / Luber

Luber : :oncoming_automobile: A ridesharing App :oncoming_taxi:
http://www.luber.fun
14 stars 11 forks source link

Username encode #112

Closed kylecrsn closed 6 years ago

kylecrsn commented 6 years ago

This PR addresses issue #67 .

Description (if needed):

This PR encodes URL's by username instead of user id. So "/users/1/overview" is now "/users/skater41/overview" for the yser skater41 and so on.

To facilitate this, a :user_username field has been added to the session, and can be accessed through session[:user_username]. This is set and destroyed in the session controller similar to :user_id, however it is also UPDATED when the user successfully changes their username. Tests have been updated to reflect these changes

Additionally, this PR adds a bunch of much needed validations for the various models

kylecrsn commented 6 years ago

I also tried to move DB queries for owners/renters/cars into the controllers instead of the views, better MVC separation

kylecrsn commented 6 years ago

Don't merge this yet, doing some additional fixes

kylecrsn commented 6 years ago

Another change includes switching from "log in, log out, sign up" naming to "sign in, sign out, sign up" everywhere