New feature - Reverse post :-) - #22
Open
TammyHer wants to merge 19 commits into
Open
Conversation
…he words in a post
… we should do something totaly else. I'm gonna stop writing the cucuember for it, and move on to merging articles
| def new_or_edit | ||
| @categories = Category.find(:all) | ||
| @category = Category.find(params[:id]) | ||
| @category = Category.new if params[:id].nil? |
There was a problem hiding this comment.
It would execute less code if you used an if/else here
|
Looks like you added the db_development and db_test files back in accidentally |
| split_text.each do |word| | ||
| reverse_string = reverse_string + " " + word | ||
| end | ||
| reverse_string = text.split.reverse!.join(" ") |
This file contains hidden or 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
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.
So it's not what we were supposed to do, but still a sweet feature that works + passing cucumber tests.
When you go to admin/content page , just where you can edit/show /delete your post - you'll notice a new button "Revers" .
Once you'll push it, the words in your post will show in the reverse order :)
You can always get the origin post back by pushing the revers button again!
Link for Heroku site:
https://pure-crag-95718.herokuapp.com/admin/content