brentd / xray-rails

☠️ A development tool that reveals your UI's bones
MIT License
1.22k stars 79 forks source link

Ensure xray bar works after Turbolinks navigation #47

Closed mattbrictson closed 9 years ago

mattbrictson commented 10 years ago

Change how Xray.Bar is initialized by deferring the lookup of the actual DOM element. If the DOM element has disappeared (e.g. due to Turbolinks navigation replacing the body), re-initialize it. This fixes #37.

My CoffeeScript is a bit rusty; do these changes look OK to you?

mattbrictson commented 10 years ago

Oops, it looks like Xray.Settings also needs a similar fix. Please hold of merging until I have a chance to update the PR.

mattbrictson commented 10 years ago

OK, I've rebased this PR. The Xray.Bar and Xray.Settings now both work after Turbolinks navigation.

brentd commented 9 years ago

This is in 0.1.15 - nice job @mattbrictson!