We had to make a site that allows us to create users.
We have generated and created a user model with 2 attributes : username
and bio
We have created a homepage connected to root
and controller static_pages
Our homepage redirect to users_controllers#new
and we did the view
- The form : is a classic HTML form who is asking
username
in input andbio
in texarea - The 'routes' : we have connect the form to correct route by creating method
create
- Play with params : we have recovers the informations to create somes users for fun
- The redirection : we have redirect the user once the forms is submitted with the method :
redirect_to
We have create a profile page for all our users (we don't forget you!)
- Profile page creation : we have create a route that takes into account
/users/id_user
then redirect it to the method :show
- Redirection to the profile page : this allows you to redirect to your profile page rather than root
We wanted you to have a real personal name in this cruel world ^_^
- Validations : as Félix would say validations is called validations...
- Rediction : there we made sure that when you do not know how to type your name it guides you step by step (also if your name has already been taken by another avenger) 😃
- /users/username : that's really cool it allows you to see your super nick in the url of your page guy like this :
/users/catwoman
Sign up on our super cool site after getting our work on github and have a little bundle install
in the folder
Thank you very much the correctors handsome kids
Realized by Cyril M. & Pacôme P, the Caen team !