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

Media Ranker Project #49

Open
wants to merge 30 commits into
base: th/master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
dbd1e17
made 3 models - book, movie, album
TammyHer Nov 30, 2015
f2135a6
created 4 new controller - 1 for welcome
TammyHer Nov 30, 2015
ab36e37
made home page
TammyHer Nov 30, 2015
61e4358
made routes and actions in the controllers
TammyHer Nov 30, 2015
61e33ff
created some seed
TammyHer Nov 30, 2015
aa71225
i MADE AN EDIT BUTTON
TammyHer Nov 30, 2015
72475cf
made new links for albums
TammyHer Dec 1, 2015
998cc26
the upvote is working... whhhhoooo
TammyHer Dec 1, 2015
b11a522
made an index page for albums
TammyHer Dec 1, 2015
da7e1e1
completed views and controller for movies (exapt delete)
TammyHer Dec 1, 2015
babed91
completed 3 models most view and controllers
TammyHer Dec 1, 2015
e68f880
made link to movie's name
TammyHer Dec 1, 2015
c64fc6a
fixed some bugs in the indexes
TammyHer Dec 1, 2015
93dfe18
made an if statement so the upvote will work in both different pages
TammyHer Dec 1, 2015
9beadeb
all deleting are working
TammyHer Dec 1, 2015
993546e
set a default rank=0, and made the validations and display the user i…
TammyHer Dec 1, 2015
f079caa
fixed some bugs - ready for testing
TammyHer Dec 1, 2015
0a98e48
got all my test to work in movies controller
TammyHer Dec 2, 2015
aad7dbb
made most of the test- include upvote
TammyHer Dec 2, 2015
4371636
upvote_i works in movies
TammyHer Dec 2, 2015
e66d3a9
only one more test and I'm good to go
TammyHer Dec 2, 2015
3d33ca3
yay got 91%. I'm good to go
TammyHer Dec 2, 2015
e22e549
did some nice bootstrap - table and index
TammyHer Dec 2, 2015
6de9d81
added some more bootstrap - DELETE button and nice table
TammyHer Dec 3, 2015
563a06d
I put the buttons in the same line as BUTTON and not link_to
TammyHer Dec 3, 2015
166ea54
bootstrap and hello kitty
TammyHer Dec 3, 2015
4050037
i think I'm done. now needs to dry things
TammyHer Dec 3, 2015
04ecc23
made list of 10 from each on the home page
TammyHer Dec 3, 2015
54cbacc
done
TammyHer Dec 4, 2015
fedf322
final stuff
TammyHer Dec 5, 2015
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
all deleting are working
TammyHer committed Dec 1, 2015
commit 9beadeb7602dc466fc7f1fc80fe21f19ab4e5ff2
2 changes: 2 additions & 0 deletions app/controllers/albums_controller.rb
Original file line number Diff line number Diff line change
@@ -40,6 +40,8 @@ def create
end

def destroy
Album.destroy(params[:id])
redirect_to albums_path
end

private
2 changes: 2 additions & 0 deletions app/controllers/books_controller.rb
Original file line number Diff line number Diff line change
@@ -39,6 +39,8 @@ def create
end

def destroy
Book.destroy(params[:id])
redirect_to books_path
end

private
2 changes: 2 additions & 0 deletions app/controllers/movies_controller.rb
Original file line number Diff line number Diff line change
@@ -44,6 +44,8 @@ def create
end

def destroy
Movie.destroy(params[:id])
redirect_to movies_path
end

private
2 changes: 1 addition & 1 deletion app/views/albums/show.html.erb
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@

<%= button_to "Upvote", { action: "update" , class: "upvote"}, method: "patch"%>
<%= button_to "Edit", { action: "edit", id: @album.id }, method: :get %>
<%= button_to "Delete", action: "destroy", id: @album.id %>
<%= button_to "Delete", {action: "destroy", id: @album.id}, method: :delete, data: { confirm: 'Are you sure?' } %>
<%= button_to "View all albums", albums_path, method: :get%>
<%= button_to "View all media", root_path, method: :get %>
2 changes: 1 addition & 1 deletion app/views/books/show.html.erb
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@

<%= button_to "Upvote", { action: "update" , class: "upvote"}, method: "patch"%>
<%= button_to "Edit", { action: "edit", id: @book.id }, method: :get %>
<%= button_to "Delete", action: "destroy", id: @book.id %>
<%= button_to "Delete", { action: "destroy", id: @book.id}, method: :delete, data: { confirm: 'Are you sure?' } %>
<%= button_to "View all books", books_path, method: :get%>
<%= button_to "View all media", root_path, method: :get %>
2 changes: 1 addition & 1 deletion app/views/movies/show.html.erb
Original file line number Diff line number Diff line change
@@ -4,6 +4,6 @@

<%= button_to "Upvote", { action: "update" , class: "upvote"}, method: "patch"%>
<%= button_to "Edit", { action: "edit", id: @movie.id }, method: :get %>
<%= button_to "Delete", action: "destroy", id: @movie.id %>
<%= button_to "Delete", { action: "destroy", id: @movie.id}, method: :delete, data: { confirm: 'Are you sure?' } %>
<%= button_to "View all movies", movies_path, method: :get%>
<%= button_to "View all media", root_path, method: :get %>