I have couple javascript functions that attaching action to buttons in controller view some/index. I navigate to some/index using link_to method. But when i'm using link_to method, buttons has no attached javascript actions (in some/index view). When i try open some/index directly from my browser, buttons have all attached actions i need and working fine.
some.js.coffee
jQuery ->
$('.my-btn').on 'click', (event) ->
...
I think it can't attach actions to buttons in some/index when i'm using link_to because it already executed all javascript in root/index view and page is not refreshing when i'm using link_to.
How can i solve this problem? Still want to use link_to)