forked from AdaGold/media-ranker
-
Notifications
You must be signed in to change notification settings - Fork 52
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
rachael water class #36
Open
RachaelGomez
wants to merge
27
commits into
Ada-C14:master
Choose a base branch
from
RachaelGomez:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+10,577
−0
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
54fec0e
Initial rails setup
RachaelGomez ddb6426
seeded database and made Works controller and model
RachaelGomez c0e91d2
fixed homepage but spotlight isn't working. made new and index but ne…
RachaelGomez 1e1d104
added edit and delete and users model and controller
RachaelGomez 877a5f7
set up users and login and created votes controller and model
RachaelGomez dbe73ce
votes won't save
RachaelGomez 3a77c1c
Votes still won't save but now I have a count so I can see them not s…
RachaelGomez a81295a
still playing with vote. added flash to edit
RachaelGomez 200b92e
Votes finally count. user nil conditional not working.
RachaelGomez 50d5f4f
user can't vote more than once. spotlight working. top ten not working.
RachaelGomez 0b3e09d
all top 10s are working
RachaelGomez 5135d86
media is sorted by number of votes
RachaelGomez 0181bae
added flash for deleted media
RachaelGomez eeebffc
just realized edit is no longer working
RachaelGomez 45b276b
fixed edit. Trying to fix heroku app
RachaelGomez afc735e
fixed heroku app
RachaelGomez deb7e2d
set up yml files for testing. Didn't set up votes because of id weird…
RachaelGomez 5a080fc
tried to fix top ten for albums and movies but am not seeing the prob…
RachaelGomez aa0ac7e
making some tests. Validations down
RachaelGomez 7858a3e
finishing up tests
RachaelGomez d4d3980
working on copying the website css
RachaelGomez 542e13f
as good as it's gonna get
RachaelGomez e08ac48
added user show page and show work helper method
RachaelGomez 1e4a348
added all works that a user has voted for
RachaelGomez fdc4f48
made lookup method for users and now have list of users who have vote…
RachaelGomez 5d4e48d
fixed a typo
RachaelGomez c668043
added upvote button to work page
RachaelGomez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
all top 10s are working
commit 0b3e09d9ac567c698a98e977908399e1c1311d44
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
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 |
---|---|---|
|
@@ -7,22 +7,22 @@ | |
<div> | ||
<h4> | ||
Top 10 Books! | ||
<% @works.top_ten[0..10].each do |work| %> | ||
<% @works.top_ten_books.each do |work| %> | ||
<% if work.category == "book" %> | ||
<li> <%= link_to work.title, work_path(work) %></li> | ||
<% end %> | ||
<% end %> | ||
</h4> | ||
<h4> | ||
Top 10 Movies! | ||
<% @works.each do |work| %> | ||
<% @works.top_ten_movies.each do |work| %> | ||
<% if work.category == "movie" %> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this here if the |
||
<li> <%= link_to work.title, work_path(work) %></li> | ||
<% end %> | ||
<% end %> | ||
<h4> | ||
Top 10 Albums! | ||
<% @works.each do |work| %> | ||
<% @works.top_ten_albums.each do |work| %> | ||
<% if work.category == "album" %> | ||
<li> <%= link_to work.title, work_path(work) %></li> | ||
<% end %> | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These methods are ok, but you can dry them up.
Or this one which uses Postgres to sort (google search to get it).