Skip to content

Conversation

@TammyHer
Copy link

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

def new_or_edit
@categories = Category.find(:all)
@category = Category.find(params[:id])
@category = Category.new if params[:id].nil?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would execute less code if you used an if/else here

@kariabancroft
Copy link

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(" ")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep! looks much better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants