Answer the question
In order to leave comments, you need to log in
How to connect the periodically_call_remote helper in rails?
I need to update the current time on a page.
I decided to use this helper (periodically_call_remote)
However, Rails unexpectedly gave an error
undefined method `periodically_call_remote'
<%= javascript_include_tag 'prototype'%>
Answer the question
In order to leave comments, you need to log in
Starting from version 3, there is an asset pipeline in rails, in short - there is a certain application.js manifest file in which you specify all js scripts. When installed, the assets are compiled into one js file. To connect third-party js, you need to put them in the vandor/assets/javascripts folder and include them in the manifest.
For common js libraries, there are gems that make it easy to connect these js libraries. For example see https://github.com/rails/prototype-rails
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question