Skip to content

Commit

Permalink
Merge pull request #28 from lofi-nowhale/noelle_new_viewing_party
Browse files Browse the repository at this point in the history
Noelle new viewing party
  • Loading branch information
JorjaF authored Oct 14, 2023
2 parents ebe0a0f + 89e8ff1 commit 0302998
Show file tree
Hide file tree
Showing 6 changed files with 2,036 additions and 2,541 deletions.
12 changes: 12 additions & 0 deletions app/controllers/viewing_parties_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
class ViewingPartiesController < ApplicationController
def new
@user = User.find_by_id(session[:user_id])
@users = User.all
id = params[:id]
@movie = MovieFacade.find_by_id(params[:id])
end

def create

end
end
19 changes: 19 additions & 0 deletions app/views/viewing_parties/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<h1><%= "Movie Title: #{@movie.title}" %></h1>

<section class="new_party">

<% form_with url: "/users/#{@user}/movies/#{@movie}/viewing_parties", method: :post, data:{turbo: false} do |f| %>
<%= f.label :duration %>
<%= f.number_field :duration, :value => @movie.runtime%>

<%= f.label :start_time %>
<%= f.datetime_field :start_time %>

<% @users.each do |user| %>
<%= check_box_tag(:user) %>
<%= label_tag(:user, "Invite #{user}") %>
<% end %>

<%= f.submit "Submit" %>
<% end %>
</section>
4 changes: 3 additions & 1 deletion config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

resources :users, only: %i[show new create] do
resources :discover, only: [:index]
resources :movies, only: [:index, :show]
resources :movies, only: [:index, :show] do
resources :viewing_parties, only: [:new, :create]
end
end
end
128 changes: 106 additions & 22 deletions coverage/.resultset.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"RSpec": {
"coverage": {
"/Users/jorjafleming/mod3/viewing_party_lite_7/spec/spec_helper.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/spec_helper.rb": {
"lines": [
1
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/environment.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/environment.rb": {
"lines": [
null,
null,
Expand All @@ -17,7 +17,7 @@
1
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/application.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/application.rb": {
"lines": [
null,
null,
Expand Down Expand Up @@ -60,7 +60,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/boot.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/boot.rb": {
"lines": [
null,
null,
Expand All @@ -70,7 +70,7 @@
1
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/environments/test.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/environments/test.rb": {
"lines": [
null,
null,
Expand Down Expand Up @@ -136,7 +136,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/initializers/assets.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/initializers/assets.rb": {
"lines": [
null,
null,
Expand All @@ -154,7 +154,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/initializers/content_security_policy.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/initializers/content_security_policy.rb": {
"lines": [
null,
null,
Expand Down Expand Up @@ -184,7 +184,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/initializers/filter_parameter_logging.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/initializers/filter_parameter_logging.rb": {
"lines": [
null,
null,
Expand All @@ -198,7 +198,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/initializers/inflections.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/initializers/inflections.rb": {
"lines": [
null,
null,
Expand All @@ -219,7 +219,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/initializers/permissions_policy.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/initializers/permissions_policy.rb": {
"lines": [
null,
null,
Expand All @@ -235,7 +235,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/config/routes.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/config/routes.rb": {
"lines": [
null,
null,
Expand All @@ -249,19 +249,21 @@
1,
1,
1,
1,
null,
null,
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/helpers/application_helper.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/helpers/application_helper.rb": {
"lines": [
null,
null,
1,
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/helpers/landing_page_helper.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/helpers/landing_page_helper.rb": {
"lines": [
1,
null
Expand Down Expand Up @@ -666,7 +668,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/spec/features/users/show_spec.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/features/users/show_spec.rb": {
"lines": [
1,
null,
Expand Down Expand Up @@ -709,7 +711,46 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/spec/models/user_spec.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/features/viewing_parties/new_spec.rb": {
"lines": [
1,
null,
1,
1,
1,
1,
1,
1,
null,
null,
null,
1,
1,
null,
1,
1,
null,
1,
null,
1,
null,
1,
null,
1,
1,
0,
0,
0,
0,
0,
null,
null,
null,
null,
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/models/user_spec.rb": {
"lines": [
1,
null,
Expand All @@ -727,7 +768,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/models/user.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/models/user.rb": {
"lines": [
1,
1,
Expand All @@ -739,7 +780,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/models/application_record.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/models/application_record.rb": {
"lines": [
null,
null,
Expand All @@ -748,7 +789,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/spec/models/user_viewing_party_spec.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/models/user_viewing_party_spec.rb": {
"lines": [
1,
null,
Expand All @@ -760,15 +801,15 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/models/user_viewing_party.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/models/user_viewing_party.rb": {
"lines": [
1,
1,
1,
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/spec/models/viewing_party_spec.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/spec/models/viewing_party_spec.rb": {
"lines": [
1,
null,
Expand All @@ -788,7 +829,7 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/models/viewing_party.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/models/viewing_party.rb": {
"lines": [
1,
1,
Expand Down Expand Up @@ -953,12 +994,27 @@
1,
null,
null,
1,
140,
123,
17,
48,
null,
1,
null,
null,
null,
1,
null,
null,
1,
null,
null,
1,
0,
0,
0,
0,
null,
null,
null,
Expand Down Expand Up @@ -1055,10 +1111,22 @@
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/poros/review.rb": {
"lines": [
1,
1,
1,
null,
1,
83,
83,
83,
83,
83,
83,
83,
83,
null,
null,
1,
11,
11,
11,
Expand Down Expand Up @@ -1101,14 +1169,30 @@
null
]
},
"/Users/jorjafleming/mod3/viewing_party_lite_7/app/controllers/landing_page_controller.rb": {
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/landing_page_controller.rb": {
"lines": [
1,
1,
2,
null,
null
]
},
"/Users/noellehemphill/turing_work/3mod/projects/viewing_party_lite_7/app/controllers/viewing_parties_controller.rb": {
"lines": [
1,
1,
1,
1,
1,
1,
null,
null,
1,
null,
null,
null
]
}
},
"timestamp": 1697319410
Expand Down
Loading

0 comments on commit 0302998

Please sign in to comment.