Made by Jenny Cárdenas and Thales Neves
This is a small example of how to implement forms in Ruby on Rails.
In this project, we created different versions of forms using various methods like form_tag, form_for and vanilla HTML form in the views file, both for creating a new form and updating an existing form.
To achieve this, we generated a user model and a users controller with the sqlite3 being used for storage.
All the form fields have the necessary validations required to check the user input.
You'll need to have both Ruby and Rails installed on your computer.
-
In the desired directory, type
git clone https://github.com/janis-jenny/Rails_Forms.git
in the terminal. -
Then type
cd Re-Former
in the terminal to change the directory into the root of the project. -
Then type
bundle install && yarn install
to download the necessary gem files for the project. -
Run
rails server
to start the server for the application. -
Open
localhost:3000/users/new
to start filling in the form and create a new user. -
Open
localhost:3000/users/id/edit
to update an existing users' information. Remember to replace theid
in the url with user id number such aslocalhost:3000/users/1/edit
.
- Ruby on Rails
👤 Jenny Cárdenas
- GitHub: @janis_jenny
- Twitter: @janis_jenny
- LinkedIn: Jenny Càrdenas
👤 Thales Neves
- GitHub: @thneves
- Twitter: @tsneves11
- LinkedIn: thales-neves10
Contributions, issues, and feature requests are welcome!
Feel free to check the issues page.
Give a ⭐️ if you like this project!
This project is MIT licensed.