Git Product home page Git Product logo

car_pool's Introduction

CarPool

Post a ride, and take others with you

Features

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

How to make this in Rails:-

cars controller
car model
cars controller + views -- new, edit, show, index, form -- bootstrap

Helper methods in Job controller

  • def cars_params params.require(:car).permit(:title, :description, :owner, :price, :category_id)
  • def find_car @car = Car.find(params[:id])

rails c (console) commands to make the Categories --

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

More to implement,

Like, share the ride
Pay for the ride and book the seat

car_pool's People

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.