I'm having weird issue. I'm getting RAW Javascript Code when URL is having .js in URL.
http://www.test.com/documents.js?list_type=index&page=2
Any idea, why it is behaving like this?
def index
Query to fetch documents
respond_to do |format|
format.html
format.js
end
end
on check-box click, calling a JQUERY to load Documents partial:
$.get('/documents.js', window.search_filter);