Search code examples
rubyopalrb

rails-opal and opal ujs on remote: true


I use rails-opal, opal-jquery gems, also require opal-ujs in application.js.rb, BUT on for example link_to "Foo", some_path, remote:true if I render e.g. remote_reply.js.rb layout:false with puts HI that code is not executed on client. If I send remote_reply.js with alert('foo'); all works fine? Is this only my problem, or such thing is unsupported? p.s. everywhere else opal works fine.


Solution

  • If someone will face that issue: you should render js file with .opal extension like remote_reply.js.opal and that will do.