My code looks like the following, but for some reason the rjs template (index.js.erb) is not being rendered. I've also tried naming the rjs file index.js.rjs with no luck.
def index respond_to do |format| format.js format.html end end
page << "var data = 'Core Selectors,Attributes,Traversing,Manipulation'.split(',');" page << "$('#example').autocomplete(data);"
How does rails decide when to render an rjs file in addition to an html file?