Post a ride, and take others with you
See the available car rides to destinations
Choose a category for easier access to the trips
Select a ride, and pay for it
Create a ride, earn money, and make new friends
cars controller
car model
cars controller + views -- new, edit, show, index, form -- bootstrap
- def cars_params params.require(:car).permit(:title, :description, :owner, :price, :category_id)
- def find_car @car = Car.find(params[:id])
Category.connection - to establish a connection
Category.create(name: "Short Trip(<10 miles)")
Category.create(name: "Medium Trip(<10 miles)")
Category.create(name: "Long Trip(<10 miles)")
change the form - = f.collection_select :category_id, Category.all, :id, :name, {promt: "Choose a category" }
cars params saves it to the db
reload the console and then @car = Car.last -- would give you the category id
Have to change the index method to filter by the categories
User login, sign up
User is made with a Devise in rails
Add it to the gemfile and bundle install
rails g devise:install
rails g devise:views
rails g devise User
rails db:migrate
Like, share the ride
Pay for the ride and book the seat