I put the following function in my application.js:
function test() {
alert("See Me")
}
classrooms/_new_small.html.haml:
:javascript
alert('test');
test();
In my application.html.haml I'm using the following:
= javascript_include_tag 'application'
I'm getting a test is not defined
error in my firebug console. Isn't the test function supposed to be available project-wide because its in the application.js file? Thanks
edit: I'm rendering the page via javascript. Would that affect it?
$('#test_container').html("<%= escape_javascript(render :partial => 'classrooms/new_small') %>");