javascript - javascript_include_tag not working -


I am using javascript_include_tag in one of my 'partial' rhtml files. However, when the page loads, I get an error in Firebug, which states that the class included in the javascript file was not defined. Actually, the Javascript file is not being added.

I have a JS file in the public / javascript folder

please help

First, which rail are you running? I know with javascript_in clause_tag apps / assets / javascript directory / public / javascript folder with default in my version of Rail (3.1.1) Placing files in the Properties / Javascript folder should allow you to link them equally in a proper way.

This will include all JS files in the property / javascript folder and already have your thoughts / layout / application.html.erb file.

  & lt;% = javascript_include_tag "application"%>   

Additionally, any subdirectory will be included by the above tag. Hope it helps.

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -