turbolinks / turbolinks-classic

Classic version of Turbolinks. Now deprecated in favor of Turbolinks 5.
MIT License
3.54k stars 431 forks source link

Script eval within permanent nodes #601

Closed jordanthomas closed 9 years ago

jordanthomas commented 9 years ago

This PR checks to see if a script tag exists within a data-turbolinks-permanent node and skipping its execution if so. This could also be solved by documenting the behavior of scripts in permanent nodes and mentioning it can be avoided by adding data-turbolinks-eval="false".

Also adds a test to demonstrate the behavior.

Related to #599 that I created and somewhat related to #546.

(fix #599)

jordanthomas commented 9 years ago

Caught up to master. I'm unsure why the failures with rails32 are happening, though. It's not happening locally for me.

Thibaut commented 9 years ago

Sorry for the delay — looks great! Please squash your commits and I'll merge.

jordanthomas commented 9 years ago

@Thibaut Squashed, thanks!

Thibaut commented 9 years ago

:heart:

jordanthomas commented 9 years ago

@tortuetorche Thanks!