forked from turingschool-examples/viewing_party_lite_7
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from lofi-nowhale/noelle_new_viewing_party
Noelle new viewing party
- Loading branch information
Showing
6 changed files
with
2,036 additions
and
2,541 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.