passing data as json from controller
Film index respons with json to getFilms JS function
json passes to functions in main.js
Resolve merge conflict in application layout erb.