forked from AdaGold/media-ranker
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Sarah Nahmias Media Ranker #75
Open
nahmisa
wants to merge
73
commits into
Ada-C6:b/sen/master
Choose a base branch
from
nahmisa:b/sen/master
base: b/sen/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.
Open
Conversation
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
Uses helper methods to make partials work across media
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On the real live internet! https://young-wildwood-17663.herokuapp.com/
Things I struggled with:
Where to put helper methods - in the model vs. in the view helpers. I do think this project helped me get a better handle on this, but it's still something I don't get intuitively. The code is easier for me to write if things are kept in the view ...
Another thing I struggled with was test. This test in particular was tricky:
test "Upvoting a book adds 1 to its upvotes" do
assert_difference("Book.find(@book.id).upvotes", 1) do
patch :upvote, { id: @book.id }
end
end
I would have liked it to look like this:
test "Upvoting a book adds 1 to its upvotes" do
assert_difference("@book.upvotes", 1) do
patch :upvote, { id: @book.id }
end
end
But that didn't work and I don't understand why and I would like to.
More practice with Foundation I'm sure is in order! I do see how it makes the CSS we write cleaner and more manageable.
I am proud of:
Deploying my site, because that's still quite a few steps with things to go wrong and lots of scary output, so hooray for pushing through that and reading the terminal output and googling stuff. I did not seed my database in production because I didn't want to deal with that (sorry). I am also proud of the tests I wrote for the controllers - especially the index actions. The ordering stuff is pretty slick.