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

Sooyung, Paul, Brendan #95

Open
wants to merge 177 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
177 commits
Select commit Hold shift + click to select a range
069b47a
Add migration tables for users, parties and partyuser.
skim1027 Nov 28, 2023
ed23b73
Add migration tables for users, parties and partyuser.
skim1027 Nov 28, 2023
29d5f19
Merge branch 'setup' of github.com:skim1027/viewing_party_lite_7 into…
skim1027 Nov 28, 2023
514a942
Merge pull request #13 from skim1027/setup
pcbennett108 Nov 28, 2023
456480f
Test:Model tests for party, partyuser, user
brendan-bondurant Nov 28, 2023
9ade1d8
Add landing page test, mvc routes
skim1027 Nov 28, 2023
1524514
Test:Basic Validation testing passes
brendan-bondurant Nov 28, 2023
e28a635
Merge pull request #14 from skim1027/landing-page
brendan-bondurant Nov 28, 2023
ab7f130
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
brendan-bondurant Nov 28, 2023
8f9c8f5
Feat:Show functionality filled out, view page started
brendan-bondurant Nov 28, 2023
90fb9b2
Merge pull request #15 from skim1027/user-dashboard-page
skim1027 Nov 28, 2023
e7ec207
Add route and view for register user
pcbennett108 Nov 28, 2023
e5edbb7
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
pcbennett108 Nov 28, 2023
459b856
Add route and user create method for new user creation
pcbennett108 Nov 28, 2023
ef34c2e
Add flash parse block to application layout
pcbennett108 Nov 28, 2023
fde710c
REF: move home link and app title from individual pages to applicatio…
pcbennett108 Nov 28, 2023
f8097a3
Add apostrophe s to pluralize name on show page
pcbennett108 Nov 28, 2023
bb49260
Add tests for register new user, update user show test for plural nam…
pcbennett108 Nov 28, 2023
b0d69c7
Add simplecov to gitignore
pcbennett108 Nov 28, 2023
7a86e05
Update create user error message to be more descriptive
pcbennett108 Nov 28, 2023
a621654
Merge pull request #16 from skim1027/user-registration-page
brendan-bondurant Nov 28, 2023
69c9fb1
Test:Testing for button to discover page
brendan-bondurant Nov 28, 2023
e89d9e0
Route for discover
brendan-bondurant Nov 28, 2023
9e9f588
Feat:Functionality for discover button
brendan-bondurant Nov 28, 2023
462007e
Add additional test for landing page
skim1027 Nov 28, 2023
eb9406b
Merge pull request #17 from skim1027/dashboard-discover-movies
skim1027 Nov 29, 2023
4059c83
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Nov 29, 2023
9f11f59
Merge pull request #18 from skim1027/landing-page
brendan-bondurant Nov 29, 2023
5869f97
Add credentials for tmdb
skim1027 Nov 29, 2023
d07c149
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Nov 29, 2023
6277a84
Merge pull request #19 from skim1027/api_key_setup
brendan-bondurant Nov 29, 2023
738e4d5
Test:Initial testing for Top Movies button
brendan-bondurant Nov 29, 2023
03f2ee7
Test:Search button test, functionality halfway
brendan-bondurant Nov 29, 2023
f3d9327
Add tests for discover movies
skim1027 Nov 29, 2023
4ff3828
Add passing tests
skim1027 Nov 29, 2023
0d7855d
Merge pull request #20 from skim1027/discover-movies-page
brendan-bondurant Nov 29, 2023
3f74592
Stash to merge
brendan-bondurant Nov 29, 2023
68f8ded
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
brendan-bondurant Nov 29, 2023
a144fb5
Update:Remove redundant tests
brendan-bondurant Nov 29, 2023
44880bd
Test:New tests for discover_spec
brendan-bondurant Nov 29, 2023
eefc3a9
Add passing test for top rated movie
skim1027 Nov 29, 2023
37d9b27
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Nov 29, 2023
3fc51c1
Update credentials
skim1027 Nov 29, 2023
288cf8a
Uncomment VCR
skim1027 Nov 29, 2023
eaa883c
Add show movie route and controller method, add movie show view
pcbennett108 Nov 29, 2023
0a1bd60
Add base movie service
pcbennett108 Nov 29, 2023
7cef731
Merge pull request #21 from skim1027/discover-movies-page
brendan-bondurant Nov 29, 2023
d8ed42f
Stash
brendan-bondurant Nov 29, 2023
7f88e14
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
brendan-bondurant Nov 29, 2023
8c0da24
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
pcbennett108 Nov 29, 2023
bbe0ec4
Add movie_details facade, move movies show OUT of private block, add …
pcbennett108 Nov 29, 2023
7cb38a8
Test:Added search test
brendan-bondurant Nov 29, 2023
c85f32b
Test:Average vote test, with functionality
brendan-bondurant Nov 30, 2023
88c6195
Test:Test for discover page button
brendan-bondurant Nov 30, 2023
c28841d
Feat:Discover Path button functionality
brendan-bondurant Nov 30, 2023
a84125e
Add movies details poro, add time format to facade
pcbennett108 Nov 30, 2023
f574b15
Add cast endpoint to service and add to poro
pcbennett108 Nov 30, 2023
7cd9bf5
Add reviews endpoint to service and update facade and poro to match
pcbennett108 Nov 30, 2023
0f1abcf
Add details, summary, and cast to show page
pcbennett108 Nov 30, 2023
6bc06af
Add reviews to movie show page
pcbennett108 Nov 30, 2023
363f9a9
Add keys filter and metadata configure to VCR configuration
pcbennett108 Nov 30, 2023
578c3be
Debug:WebMock changes added to fix error
brendan-bondurant Nov 30, 2023
0a92207
Refactor:RuboCop changes made
brendan-bondurant Nov 30, 2023
5d2799f
Refactor:More rubocop
brendan-bondurant Nov 30, 2023
6ca4c51
Feat:Fixed Search feature, limit 20
brendan-bondurant Nov 30, 2023
20b5339
Test:Testing search feature only returns 20
brendan-bondurant Nov 30, 2023
774e950
Add base feature test for movies show page
pcbennett108 Nov 30, 2023
ce587ea
More rubocop
brendan-bondurant Nov 30, 2023
59cd9e0
Merge pull request #22 from skim1027/movie-results-page
skim1027 Nov 30, 2023
40a23aa
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
pcbennett108 Nov 30, 2023
90804f0
Add rest of feature tests to movie show spec along with results of me…
pcbennett108 Nov 30, 2023
dc11cfe
Add movie service tests
pcbennett108 Nov 30, 2023
6d67438
Add movie details poro test with fixture files
pcbennett108 Nov 30, 2023
c511899
Add test for movie details facade
pcbennett108 Nov 30, 2023
f8ecff9
Add pull request template to root
pcbennett108 Nov 30, 2023
c34bedb
Merge pull request #23 from skim1027/movie-details-page
brendan-bondurant Nov 30, 2023
9bd6389
movie show spec WIP
skim1027 Nov 30, 2023
00efc63
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Nov 30, 2023
dceae5a
Merge main
skim1027 Nov 30, 2023
b21337a
Migration to add host to party users
brendan-bondurant Nov 30, 2023
c383dfa
Merge pull request #26 from skim1027/setup
skim1027 Nov 30, 2023
6f1e579
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Nov 30, 2023
b994c0f
Refactor: remove iVar from MovieDetailsFacade and rename fullDetails …
pcbennett108 Nov 30, 2023
eac2a48
Update tests using MovieDatailsFacade to work with renamed method, ge…
pcbennett108 Nov 30, 2023
80bd067
Test:MovieSearch PORO test passes
brendan-bondurant Nov 30, 2023
eabcb41
Merge pull request #28 from skim1027/ref-movie-details-facade
skim1027 Nov 30, 2023
fde4861
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Nov 30, 2023
a79f34c
Refactor:GreenRedGreen for movie search
brendan-bondurant Nov 30, 2023
9d4b3f2
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
brendan-bondurant Nov 30, 2023
3e3a968
Add passing test for existance of forms
skim1027 Dec 1, 2023
d89fd0c
Test:facade written but VCR is causing problems
brendan-bondurant Dec 1, 2023
e411e6f
WIP
skim1027 Dec 1, 2023
63cd34f
Test:Search Facade tests complete
brendan-bondurant Dec 1, 2023
ccfff05
WIP form
skim1027 Dec 1, 2023
ca8d659
Merge pull request #29 from skim1027/refactor-movie-controller-search
skim1027 Dec 1, 2023
7f2f70b
WIP forms and test
skim1027 Dec 1, 2023
87f4c18
Merge branch 'main' into new-viewing-party-page
skim1027 Dec 1, 2023
832b7a7
Add call to user facade in SHOW
pcbennett108 Dec 1, 2023
b5bc178
Add queries of parties to User and queries of attendees to Party
pcbennett108 Dec 1, 2023
82b0040
Add seeds
pcbennett108 Dec 1, 2023
e9694d0
Add image endpoint to movie service
pcbennett108 Dec 1, 2023
629db9c
Add user_party lists to user dashboard SHOW page
pcbennett108 Dec 1, 2023
5c8960d
Add user facade to pass data to user dashboard
pcbennett108 Dec 1, 2023
84991a6
Add tests for models
pcbennett108 Dec 1, 2023
a8f1dc8
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7
pcbennett108 Dec 1, 2023
a59e032
WIP form edit
skim1027 Dec 1, 2023
84e7cf2
bulk commit
pcbennett108 Dec 1, 2023
f5c5101
Merge branch 'main' into dashboard-viewing-parties
pcbennett108 Dec 1, 2023
1b41286
Add to user model spec
pcbennett108 Dec 1, 2023
c67d844
made change
pcbennett108 Dec 1, 2023
6290d5b
Add changes
pcbennett108 Dec 1, 2023
d6f230c
Add updated checkbox
skim1027 Dec 1, 2023
190648d
Merge pull request #30 from skim1027/dashboard-viewing-parties-new
brendan-bondurant Dec 1, 2023
c2b1a08
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Dec 1, 2023
cd34d20
Refactor:Facade, Service, Poro top20
brendan-bondurant Dec 1, 2023
86b1d56
Refactor:Add link to top20 and movie search view
brendan-bondurant Dec 1, 2023
34461f1
Save point, add more tests for facade, service, poro
brendan-bondurant Dec 1, 2023
0a9a7ca
Passing test for create new
skim1027 Dec 1, 2023
55b6fc7
Fix: remove language param from API call
pcbennett108 Dec 2, 2023
86229d0
UN-comment code to show movie poster images
pcbennett108 Dec 2, 2023
0ffb7c1
Add fixture for movie_image facade test and reset VCR cassettes
pcbennett108 Dec 2, 2023
272ab7e
Add test for user facade
pcbennett108 Dec 2, 2023
e43f4b6
Tests:Top20Facade spec created
brendan-bondurant Dec 2, 2023
af6067c
Test:Top20Service tests
brendan-bondurant Dec 2, 2023
a52bdec
Test:Poro test for top20
brendan-bondurant Dec 2, 2023
b52db7a
Merge pull request #31 from skim1027/new-viewing-party-page
brendan-bondurant Dec 2, 2023
5f8227f
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
brendan-bondurant Dec 2, 2023
a56d367
Debug:Fix redundancy in top20 facade
brendan-bondurant Dec 2, 2023
2b2dd95
Add feature tests for user dashboard
pcbennett108 Dec 2, 2023
0fcb36a
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
pcbennett108 Dec 2, 2023
07105ec
Reset VCR cassettes, moved viewing party tests into their own folder
pcbennett108 Dec 2, 2023
6e4bbcf
Merge pull request #32 from skim1027/refactor_top20
pcbennett108 Dec 2, 2023
bcf822a
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
pcbennett108 Dec 2, 2023
6a38ddf
Fix ordering issue in user model test
pcbennett108 Dec 2, 2023
1046dc9
Merge pull request #33 from skim1027/dashboard-viewing-parties-new
brendan-bondurant Dec 2, 2023
c1875fc
Test:Get URL tests
brendan-bondurant Dec 2, 2023
a4393f8
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
brendan-bondurant Dec 2, 2023
36dc366
Stopping point
brendan-bondurant Dec 2, 2023
8b4d12c
Merge pull request #34 from skim1027/testto100
skim1027 Dec 2, 2023
f9cd71b
Refactor create method
skim1027 Dec 2, 2023
6e6ec43
Tests:100 percent
brendan-bondurant Dec 2, 2023
146317a
Refactor and update vcr
skim1027 Dec 2, 2023
0b7ebca
Merge pull request #35 from skim1027/testto100
pcbennett108 Dec 2, 2023
df557c5
Merge branch 'main' of github.com:skim1027/viewing_party_lite_7 into …
skim1027 Dec 2, 2023
9d1474c
Add sad path test
skim1027 Dec 2, 2023
47dd52e
Add create viewing party button test
skim1027 Dec 2, 2023
497ff19
remove duplicate test and commented out sections
skim1027 Dec 2, 2023
d3c8aac
Update rubocop errors
skim1027 Dec 2, 2023
2a5c180
Merge pull request #36 from skim1027/refactor_viewing_party
brendan-bondurant Dec 2, 2023
79ea081
Update test for creating user
skim1027 Dec 11, 2023
669903c
Add all test for user failures
skim1027 Dec 11, 2023
8c5c8a3
Update user controller
skim1027 Dec 11, 2023
666888b
Authentication Assignment
brendan-bondurant Dec 11, 2023
ee82692
Merge pull request #37 from brendan-bondurant/authentication
brendan-bondurant Dec 11, 2023
a62a8df
Revert "Authentication Assignment"
brendan-bondurant Dec 12, 2023
1cd3c14
Merge pull request #38 from skim1027/revert-37-authentication
brendan-bondurant Dec 12, 2023
8e13eb3
Add all passing tests
skim1027 Dec 12, 2023
339efcc
Merge pull request #39 from skim1027/authentication
skim1027 Dec 12, 2023
eca982e
Update login method
skim1027 Dec 12, 2023
0f1bca5
Merge pull request #40 from skim1027/authentication
skim1027 Dec 12, 2023
9f5b408
Add passing first portion of test for logout
skim1027 Dec 12, 2023
32e4bad
Add current
skim1027 Dec 12, 2023
b61b8df
Update with part 1 task 2
skim1027 Dec 12, 2023
47c5d46
Part 2 task 3, US 1
skim1027 Dec 12, 2023
ba76977
Part 2 task 4, US 2
skim1027 Dec 13, 2023
17ca9eb
Add Task 5 US 3
skim1027 Dec 13, 2023
74f6882
Add all passing tests
skim1027 Dec 13, 2023
629e7db
Merge pull request #41 from skim1027/authorization
skim1027 Dec 13, 2023
e0cd3ef
Update login into button
skim1027 Dec 20, 2023
4723efc
Update form
skim1027 Dec 20, 2023
e135ad2
Updated nav bar
skim1027 Dec 22, 2023
2dc01b9
Update readme
skim1027 Dec 23, 2023
9057dfa
Update test
skim1027 Dec 23, 2023
bcaf5c6
Update test again
skim1027 Dec 23, 2023
123d9c5
Merge pull request #42 from skim1027/formatting
skim1027 Dec 23, 2023
f4b628f
Updates
skim1027 Jan 30, 2024
6105efb
Merge pull request #43 from skim1027/formatting
skim1027 Jan 30, 2024
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
Binary file added .DS_Store
Binary file not shown.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# Ignore bundler config.
/.bundle

/coverage
# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
Expand All @@ -27,5 +27,8 @@

/public/assets

# Ignore simplecov generated files
/coverage

# Ignore master key for decrypting credentials and more.
/config/master.key
1 change: 1 addition & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--require spec_helper
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Metrics/BlockLength:
IgnoredMethods:
- RSpec.describe
- describe
- it
- context
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"cSpell.words": [
"Habenula",
"Sooyung",
"tahmid",
"tmdb"
]
}
17 changes: 11 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,16 @@ gem "stimulus-rails"

# Build JSON APIs with ease [https://github.com/rails/jbuilder]
gem "jbuilder"

gem "faraday"
gem 'bootstrap-datepicker-rails'
# Use Redis adapter to run Action Cable in production
# gem "redis", "~> 4.0"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"

# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
# gem "bcrypt", "~> 3.1.7"
gem "bcrypt", "~> 3.1.7"

# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
Expand All @@ -51,6 +52,12 @@ gem "bootsnap", require: false
group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "pry"
gem "rspec-rails"
gem "capybara"
gem "launchy"
gem "simplecov"
gem "shoulda-matchers"

end

group :development do
Expand All @@ -66,8 +73,6 @@ group :development do
end

group :test do
gem "rspec-rails"
gem "capybara"
gem "launchy"
gem "simplecov"
gem "webmock"
gem "vcr"
end
26 changes: 26 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,13 @@ GEM
addressable (2.8.4)
public_suffix (>= 2.0.2, < 6.0)
ast (2.4.2)
base64 (0.2.0)
bcrypt (3.1.20)
bindex (0.8.1)
bootsnap (1.16.0)
msgpack (~> 1.2)
bootstrap-datepicker-rails (1.10.0.1)
railties (>= 3.0)
builder (3.2.4)
capybara (3.39.2)
addressable
Expand All @@ -84,13 +88,21 @@ GEM
xpath (~> 3.2)
coderay (1.1.3)
concurrent-ruby (1.2.2)
crack (0.4.5)
rexml
crass (1.0.6)
date (3.3.3)
diff-lcs (1.5.0)
docile (1.4.0)
erubi (1.12.0)
faraday (2.7.12)
base64
faraday-net_http (>= 2.0, < 3.1)
ruby2_keywords (>= 0.0.4)
faraday-net_http (3.0.2)
globalid (1.1.0)
activesupport (>= 5.0)
hashdiff (1.0.1)
i18n (1.14.1)
concurrent-ruby (~> 1.0)
importmap-rails (1.2.1)
Expand Down Expand Up @@ -213,6 +225,9 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
ruby-progressbar (1.13.0)
ruby2_keywords (0.0.5)
shoulda-matchers (5.3.0)
activesupport (>= 5.2.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
Expand All @@ -237,11 +252,16 @@ GEM
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.4.2)
vcr (6.2.0)
web-console (4.2.0)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.19.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -254,8 +274,11 @@ PLATFORMS
x86_64-darwin-21

DEPENDENCIES
bcrypt (~> 3.1.7)
bootsnap
bootstrap-datepicker-rails
capybara
faraday
importmap-rails
jbuilder
launchy
Expand All @@ -265,12 +288,15 @@ DEPENDENCIES
rails (~> 7.0.4, >= 7.0.4.2)
rspec-rails
rubocop-rails
shoulda-matchers
simplecov
sprockets-rails
stimulus-rails
turbo-rails
tzinfo-data
vcr
web-console
webmock

RUBY VERSION
ruby 3.2.2p53
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ Viewing Party Lite is an application in which users can explore movie options an
- Rails 7.0.6

Example wireframes to follow are found [here](https://backend.turing.edu/module3/projects/viewing_party_lite/wireframes)


## Contributors

- Brendan Bondurant
- Paul Bennett
- Sooyung Kim


141 changes: 141 additions & 0 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,144 @@
*= require_tree .
*= require_self
*/

body {
background-image: url("https://wallpapercave.com/wp/uQNQiZW.jpg");
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
margin: 0; /* Optional: Remove default body margin */
height: 100vh;
}

.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: rgb(46, 30, 29);
height: 100vh;
margin: 0;
}

.show_content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: rgb(46, 30, 29);
height: 160vh;
margin: 0;
}

table {
width: 100%;
border: 1px solid;
}

html * {
font-family: monospace;
}

ul {
list-style-type: none;
margin: 0;
padding: 0;
overflow: hidden;
background-color: #333;
}

li {
float: left;
}

li a {
display: block;
color: white;
text-align: center;
padding: 14px 16px;
text-decoration: none;
}

li a:hover {
background-color: #111;
}
.register-container {
max-width: 600px; /* Adjust the maximum width as needed */
justify-content: center;
margin-left: 290px;
}

.register-form {
display: grid;
gap: 10px;
grid-template-columns: repeat(2, 1fr);
}

.register-form h2 {
grid-column: span 2; /* Make the heading span both columns */
text-align: center;
}

.register-form label {
display: block;
}

.register-form input {
width: 100%;
padding: 8px;
box-sizing: border-box;
}

.register-form br {
display: none; /* Hide line breaks to make styling consistent */
}

.register-form button {
grid-column: span 2; /* Make the button span both columns */
background-color: #4caf50;
color: white;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
}

.flash_message {
font-size: 15px;
border: 2px solid #030303;
font-weight: bold;
padding: 5px;
text-align: center;
}

.error {
background-color: #f68080;
border-color: #f50a0a;
}

.success {
background-color: #80f6a3;
border-color: #0af54d;
}

.column {
margin: 0 auto; /* Center the column horizontally */
width: 50%;
padding: 1rem;
}

.row {
display: flex;
justify-content: space-between; /* Adjust as needed */
align-items: center; /* Adjust as needed */
padding: 10px;
}

.row > * {
margin-right: 10px; /* Adjust the margin as needed */
}

.row > *:last-child {
margin-right: 0; /* Remove margin for the last child to avoid unnecessary spacing */
}
9 changes: 9 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,11 @@
class ApplicationController < ActionController::Base
helper_method :current_user

def index
@users = User.all
end

def current_user
@_current_user ||= User.find(session[:user_id]) if session[:user_id]
end
end
23 changes: 23 additions & 0 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# frozen_string_literal: true

class MoviesController < ApplicationController
def index # rubocop:disable Metrics/AbcSize,Metrics/MethodLength
@user = User.find(params[:user_id])

if params[:top_movies] == 'top rated'
@facade = Top20Facade.new(params[:top_movies])
elsif params[:commit] == 'Find Movies'
if !params[:search].empty?
@facade = MovieSearchFacade.new(params[:search])
elsif params[:search].empty?
redirect_to discover_user_path(@user)
flash[:error] = "Please fill in with a movie title"
end
end
end

def show
@facade = MovieDetailsFacade.new(params[:id])
@user = User.find(params[:user_id])
end
end
7 changes: 7 additions & 0 deletions app/controllers/sessions_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class SessionsController < ApplicationController
def destroy
session.clear
redirect_to root_path
flash[:success] = 'Logged Out'
end
end
Loading