Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
147 commits
Select commit Hold shift + click to select a range
d65ca5d
Rails new commit + model: Trip, Passenger, Driver
jasyl Nov 3, 2020
7ae05f4
created the three controllers and routes
trambui09 Nov 3, 2020
a72e145
wrote index and show actions in controllers and made views for them
trambui09 Nov 3, 2020
a45d84f
completed index.html.erb view
trambui09 Nov 3, 2020
ffce8ef
wrote index test for passengers
trambui09 Nov 3, 2020
8b53161
wrote tests for passenger show and new
trambui09 Nov 3, 2020
0f30fa4
created migration to link passengers and drivers to trips
trambui09 Nov 3, 2020
5293850
changed 'phone number' to 'phone_num' in passenger model
jasyl Nov 3, 2020
b6560b2
made partial view forms and updated the new and create actions
trambui09 Nov 3, 2020
c46174e
set up the controller with the 7 actions & driver_params
jasyl Nov 3, 2020
8e19f7d
wrote 1 create passengers test
trambui09 Nov 3, 2020
55e5de5
header nav for all passengers and new passenger links
trambui09 Nov 3, 2020
141ae59
wrote edit and update action in controller
trambui09 Nov 3, 2020
1d842e9
test for edit passengers
trambui09 Nov 3, 2020
e286f0a
filled in all actions with default behavior
jasyl Nov 3, 2020
47ca4cb
wrote test for update passenger
trambui09 Nov 3, 2020
e4daebc
slightly alter the update test for passengers
trambui09 Nov 3, 2020
618369c
fixed typo on line 49
jasyl Nov 3, 2020
e51216c
added empty erb view files
jasyl Nov 3, 2020
6f86e44
completed test for index
jasyl Nov 3, 2020
a506691
completed test for new, create, show, edit, update. Excluding validat…
jasyl Nov 3, 2020
0b19793
added 404 page
jasyl Nov 3, 2020
38a6bb5
fixed typo
jasyl Nov 3, 2020
905a6fe
fleshed out destroy action
jasyl Nov 3, 2020
a00fdbc
forgot to actually delete driver in destroy action, fixed now
jasyl Nov 3, 2020
946559b
Merge branch 'master' into driver_setup
jasyl Nov 3, 2020
ee246e3
inital set up of show view
jasyl Nov 3, 2020
a8dd279
initial set up of new form view
jasyl Nov 3, 2020
ce6e169
wrote the destroy action and corresponding tests
trambui09 Nov 3, 2020
b178280
added the partial form view for edit and new
jasyl Nov 4, 2020
87cdcd3
added links to add driver and list drivers and the homepage
jasyl Nov 4, 2020
ee94a33
Merge branch 'driver_setup' into master
jasyl Nov 4, 2020
4605b10
commented out home page link
jasyl Nov 4, 2020
c9f2a4f
forget to end the form, fixed
jasyl Nov 4, 2020
2fc74ff
wrote the destroy action and corresponding tests
trambui09 Nov 3, 2020
d25f938
Merge branch 'passenger_destroy' into master
trambui09 Nov 4, 2020
6f41370
added the homepage & updates the trips routes
jasyl Nov 4, 2020
e5c2c76
wrote actions for the 5 routes for trips controller
trambui09 Nov 4, 2020
6443986
changed the passenger model to include validation
trambui09 Nov 4, 2020
c2db6ac
_form errors surfacing
trambui09 Nov 4, 2020
93264d6
create empty view pages
jasyl Nov 4, 2020
7a6c2b6
Merge branch 'master' into trip_view
jasyl Nov 4, 2020
22efeef
changed the trips redirect action
trambui09 Nov 4, 2020
b9328b2
added form for edit View
jasyl Nov 4, 2020
1d8b0f4
added details for trip show page
jasyl Nov 4, 2020
9514ec1
Merge branch 'master' into trip_view
jasyl Nov 4, 2020
731ea59
added logic to show all trips associated with each driver
jasyl Nov 4, 2020
59c16a6
added links to passenger and driver
jasyl Nov 4, 2020
e34571e
added in the bad_request view and added tests for trip
jasyl Nov 4, 2020
4bd23e7
display trips list on passenger show view
trambui09 Nov 4, 2020
794cd11
calculated total_cost in passenger model and displayed in show view
trambui09 Nov 4, 2020
64b9804
tried to nest the trips routes for passengers and fixed trips controller
trambui09 Nov 4, 2020
04d3aaa
added methods for average rating, total earnings, and single trip ear…
jasyl Nov 4, 2020
dfe2e4a
updated driver show view with table to show details of each trip
jasyl Nov 4, 2020
2099fe2
Merge branch 'driver_model' into master
jasyl Nov 4, 2020
96e6be8
added tests to invalid params passenger
trambui09 Nov 4, 2020
3b2443c
modified trips controller
trambui09 Nov 4, 2020
ff89e20
trips controller create action
trambui09 Nov 4, 2020
b47831f
removed extra validation on driver to pass tests and add status to tr…
jasyl Nov 4, 2020
de0ac23
removed the avaiable as an option on the form
jasyl Nov 4, 2020
a429397
Merge branch 'master' into passenger_nested_create
trambui09 Nov 4, 2020
cf085d6
added get_available_driver method
jasyl Nov 4, 2020
cc3e411
Merge branch 'master' into driver_model
jasyl Nov 4, 2020
f9eda1f
added table/columns to trips list in passenger show page
trambui09 Nov 5, 2020
65730f7
add new trip works now with passenger id
trambui09 Nov 5, 2020
f1833f2
updated tests and renders
jasyl Nov 5, 2020
a25c06f
Merge branch 'master' into driver_model
jasyl Nov 5, 2020
eff6368
implemented get_available_driver in trip controller and fixed tests
jasyl Nov 5, 2020
d761d44
small changes to the trips controller
trambui09 Nov 5, 2020
e7ce47d
drop down rating on the trip show page
trambui09 Nov 5, 2020
b1855cf
forced index to order driver by id
jasyl Nov 5, 2020
a357df8
updated average rating to consider nils
jasyl Nov 5, 2020
ad4bca1
updated the seed file to covert cost to decimal
jasyl Nov 5, 2020
4b6bb61
added length validation for vin & updated driver tests
jasyl Nov 5, 2020
6d39420
added rating and cost validations & updated tests
jasyl Nov 5, 2020
bb84d1f
Merge branch 'master' into driver_views_update
jasyl Nov 5, 2020
afe5eb6
updated driver _form with validation errors, removed available option
jasyl Nov 5, 2020
96359ba
updated driver index and show page with edit and delete links
jasyl Nov 5, 2020
9dfce77
show float for passenger total cost
trambui09 Nov 5, 2020
e5abf78
wrote tests for trip model
trambui09 Nov 5, 2020
9c2c68d
wrote the total_cost test for passenger model
trambui09 Nov 5, 2020
52c9735
if driver is deleted, trips associated with driver are deleted, updat…
jasyl Nov 5, 2020
f941443
Merge branch 'driver_delete' into master
jasyl Nov 5, 2020
219f05a
add validation tests & slightly modified trip validation
jasyl Nov 5, 2020
9424cb6
fixed inital tests for driver model
jasyl Nov 5, 2020
e698a9e
changed the passenger show view
trambui09 Nov 5, 2020
cff70d9
added available and unavailble methods in driver model
jasyl Nov 5, 2020
7d802f6
Merge branch 'driver_model' into master
jasyl Nov 5, 2020
34115a9
commented out validation for destroying trip
jasyl Nov 5, 2020
000cbb8
alter the request a trip button to up top
trambui09 Nov 5, 2020
30036a0
use num_to_currency to display trip.cost properly
trambui09 Nov 5, 2020
90b44fc
added a complete_Trip custom method to trip model
trambui09 Nov 5, 2020
69f6bb0
wrote test for complete_trip action
trambui09 Nov 6, 2020
902c1fd
moved trip creation inside of the trip model
jasyl Nov 6, 2020
315bb29
added redirect to trip_path for update action
jasyl Nov 6, 2020
98cf4d3
added average_rating test
jasyl Nov 6, 2020
a2522e0
Merge branch 'master' of https://github.com/jasyl/ride-share-rails in…
jasyl Nov 6, 2020
3595b0e
changed the random cost to a reasonable number
trambui09 Nov 6, 2020
be0d2b5
added tests for availability, total revenue, and average cost
jasyl Nov 6, 2020
dbe52d1
Merge branch 'driver_test' into master
jasyl Nov 6, 2020
7ec22bf
fixed the form to capture passenger_id
jasyl Nov 6, 2020
9d94550
minor changes to cost as currency
trambui09 Nov 6, 2020
57938b8
change trip show details page to column view
trambui09 Nov 6, 2020
8983ee3
incorporated calender into trip edit form
jasyl Nov 6, 2020
8ba66c2
Merge branch 'master' of https://github.com/jasyl/ride-share-rails in…
jasyl Nov 6, 2020
fe6245d
moved edit/delete to be near passenger name
trambui09 Nov 6, 2020
d0d1e14
Merge branch 'master' of https://github.com/jasyl/ride-share-rails in…
jasyl Nov 6, 2020
3b970c1
deleted superflous comments
trambui09 Nov 6, 2020
c50d69b
deleted 2 custom method tests from passenger test
trambui09 Nov 6, 2020
2dfca1d
Merge branch 'master' of https://github.com/jasyl/ride-share-rails in…
jasyl Nov 6, 2020
025252f
made small consistency updates
jasyl Nov 6, 2020
889a380
updated the trip data colum from string to datetime
jasyl Nov 6, 2020
f3cf1a6
updated trip edit to include date picker, updated format of date in a…
jasyl Nov 6, 2020
c6cc1c9
fixed some texts to accomondate for the datatype change
jasyl Nov 6, 2020
92bd25a
added round to cost to reduce decimal output
jasyl Nov 6, 2020
2139c71
made some minor updates
jasyl Nov 6, 2020
2641cc7
removed some extra fluff
jasyl Nov 6, 2020
18c35f7
nav and homepage styling
jasyl Nov 6, 2020
0397780
Merge branch 'master' into css
jasyl Nov 6, 2020
b708b9f
removed the strftime(%m/%d/%Y) from the show pages
trambui09 Nov 6, 2020
1009670
homepage styling
jasyl Nov 6, 2020
f909f97
added the strftime(%m/%d/%Y) back
trambui09 Nov 6, 2020
ca4c18a
styling in the passenger show page
trambui09 Nov 6, 2020
e10663e
added nav bar styling and homepage background image
jasyl Nov 6, 2020
7dd6f24
fixed merge
jasyl Nov 6, 2020
b01c7c2
styled the passenger and driver index page
trambui09 Nov 6, 2020
2ed0a92
homepage styling
jasyl Nov 6, 2020
9de89cd
Merge branch 'master' of https://github.com/jasyl/ride-share-rails in…
jasyl Nov 6, 2020
feed105
trip show page
trambui09 Nov 6, 2020
b7ab38f
added back the date syntax
trambui09 Nov 6, 2020
ea50a55
styled forms
jasyl Nov 6, 2020
5c33dcf
fixed bugs
trambui09 Nov 6, 2020
cacbae8
added comments
jasyl Nov 6, 2020
6580e60
Merge branch 'master' of https://github.com/jasyl/ride-share-rails in…
jasyl Nov 6, 2020
87697da
changed the datetime for tests to pass
trambui09 Nov 6, 2020
7f10232
Merge branch 'master' of https://github.com/jasyl/ride-share-rails in…
jasyl Nov 6, 2020
c1ae70e
rewrote tests
jasyl Nov 6, 2020
a0ca8e6
fix test
jasyl Nov 6, 2020
d48b7fb
changed before block to let
jasyl Nov 6, 2020
96f7e77
added request trip test in trip model
jasyl Nov 6, 2020
cdc7e3d
changed trip controller test
trambui09 Nov 6, 2020
8f558ca
updated create in trip test
jasyl Nov 6, 2020
8727bca
updated trip controller & merge
jasyl Nov 6, 2020
6992932
changed test to check if driver availibility is false
jasyl Nov 7, 2020
7a9a792
updated form so text field stays consistent size.
jasyl Nov 7, 2020
4ed4ec9
changed buttons and tables styling
trambui09 Nov 7, 2020
6c04b4b
changed config.asset.compile = true, for bg image to load on heroku
jasyl Nov 7, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
defaults
36 changes: 36 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'

# Ignore bundler config.
/.bundle

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore pidfiles, but keep the directory.
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep

# Ignore uploaded files in development.
/storage/*
!/storage/.keep

/public/assets
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.6.5
78 changes: 78 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.6.5'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.3', '>= 6.0.3.4'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Use SCSS for stylesheets
gem 'sass-rails', '>= 6'
# Transpile app-like JavaScript. Read more: https://github.com/rails/webpacker
gem 'webpacker', '~> 4.0'
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
gem 'turbolinks', '~> 5'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false

group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
end

group :development do
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
gem 'web-console', '>= 3.3.0'
gem 'listen', '~> 3.2'
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test do
# Adds support for Capybara system testing and selenium driver
gem 'capybara', '>= 2.15'
gem 'selenium-webdriver'
# Easy installation and use of web drivers to run system tests with browsers
gem 'webdrivers'
end

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

gem 'jquery-rails'
gem 'jquery-turbolinks'
gem 'bootstrap'
group :development, :test do
gem 'pry-rails'
end

group :development do
gem 'guard'
gem 'guard-minitest'
gem 'debase', '>= 0.2.4.1'
gem 'ruby-debug-ide', '>= 0.7.0'
end

group :development do
gem 'better_errors'
gem 'binding_of_caller'
end

group :test do
gem 'minitest-rails'
gem 'minitest-reporters'
end
Loading