shannonwells / clickbait_generator

A clickbait headline generator in Rails.
MIT License
2 stars 0 forks source link

Deeplinks using browser location.hash #24

Closed bunnymatic closed 7 years ago

bunnymatic commented 7 years ago

Move best_of show handling onto the root page

* use location.hash to pass the id of the 'best of' that you want to see
* clear the hash when a new cb is generated
* added best_of_url helper method (not in routes) that builds anchored link on root (/#<cb_id>)
* add hash watcher in js on page load.
* remove clickbaits#show
* move javascript functions into a namespace (so they could be tested more easily)
shannonwells commented 7 years ago

IIRC the upshot of our discussion this morning (2/14) was, we can keep/put back best_of route just for a ranked, sortable listing of headlines, and we don't need the show page at all, and you should keep going the route you're going.

bunnymatic commented 7 years ago

me thinks this is ready to roll

shannonwells commented 7 years ago

bitmoji