Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

&& Steffany & Nicoleta #13

Open
wants to merge 49 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
dd797ee
set-up original rails project
nbrandolini May 7, 2018
54e4095
added customer and movie models
steffnay May 7, 2018
c70e150
added registered_at column to customers table
steffnay May 7, 2018
ee40590
added customers and movies controllers
nbrandolini May 7, 2018
660b650
routes
steffnay May 7, 2018
fb5e36a
merge conflict resolved
steffnay May 7, 2018
32129f6
setup seed data
steffnay May 7, 2018
3266fb2
index customerscontroller tests
nbrandolini May 8, 2018
a6aa7d4
changes
steffnay May 8, 2018
d6c97e8
merge conflict resolved
steffnay May 8, 2018
408ad30
added tests for index moviecontroller
nbrandolini May 8, 2018
6b13ed1
Merge branch 'videobranch'
nbrandolini May 8, 2018
754b961
updated model validations
steffnay May 8, 2018
a677b53
basic model tests
steffnay May 8, 2018
f00ef06
updated schema
steffnay May 8, 2018
3c19c9e
added routes for movie controller and create method show
nbrandolini May 8, 2018
0c35866
Merge branch 'videobranch'
nbrandolini May 8, 2018
cb67c55
added available_inventory parameter
nbrandolini May 8, 2018
a7bbef5
added movies#create
steffnay May 8, 2018
3f8f09f
Merge branch 'master' of https://github.com/nbrandolini/VideoStoreAPI
steffnay May 8, 2018
66a98d5
updated seed file so movies available matches inventory
steffnay May 8, 2018
9737b53
added tests for show moviecontrollers
nbrandolini May 8, 2018
bf489ec
Merge branch 'videobranch'
nbrandolini May 8, 2018
16977fc
added movies controller#create tests
steffnay May 8, 2018
56e5eb6
resolved merge conflict
steffnay May 8, 2018
cf11f32
tests for show moviescontroller done
nbrandolini May 8, 2018
a1d8850
Merge branch 'videobranch'
nbrandolini May 8, 2018
62a4c94
updated movie_params so params are no longer nested
steffnay May 8, 2018
21a2fd0
Merge branch 'master' of https://github.com/nbrandolini/VideoStoreAPI
steffnay May 8, 2018
a8372ec
added movies_checked_out_count to customerscontroller
nbrandolini May 8, 2018
98bd044
created rentals model
steffnay May 9, 2018
a238727
generated rental controller and methods
nbrandolini May 9, 2018
6ded50d
added routes to rental controller
nbrandolini May 9, 2018
d037aa2
added check_out method to rentals controller
steffnay May 9, 2018
2a65a92
added checkin method for rental
nbrandolini May 9, 2018
05b59b6
changed routes to match postman
nbrandolini May 9, 2018
4fad254
fixed method for checkin
nbrandolini May 9, 2018
a06c188
updated rentals controller tests and rentals model validations
steffnay May 9, 2018
3f63920
updated checkout method
steffnay May 9, 2018
043c7d7
updated rentals controller tests
steffnay May 10, 2018
23ebe97
updated rental methods
steffnay May 11, 2018
adf6ffe
adjusted rentals controller and customer model to check that customer…
steffnay May 11, 2018
f1fc453
updated check in and check out methods
steffnay May 11, 2018
fb8416f
deleted unsed customer model method
steffnay May 11, 2018
a650448
fixed test customer controller
nbrandolini May 11, 2018
9b282dd
Merge branch 'master' of https://github.com/nbrandolini/VideoStoreAPI
nbrandolini May 11, 2018
a7c1099
updated rental model test
steffnay May 11, 2018
f80c2e5
removed error migration
steffnay May 11, 2018
7475fcc
added rentals check-in testing
steffnay May 11, 2018
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
Prev Previous commit
Next Next commit
deleted unsed customer model method
steffnay committed May 11, 2018
commit fb8416f5c4d5277596cd55d3debb0fa3890c18d7
7 changes: 0 additions & 7 deletions app/models/customer.rb
Original file line number Diff line number Diff line change
@@ -4,13 +4,6 @@ class Customer < ApplicationRecord
validates :name, presence: :true, format: { with: /\A[a-zA-Z]+(?: [a-zA-Z]+)?\z/,
message: "Only allows letters" }

def update_checkout
self.movies_checked_out_count += 1
self.save
end



def update_count(params)
if params == "in"
self.movies_checked_out_count -= 1