I am trying to upgrade my application to Rails 3.1, and I have quite a few custom Javascript files that I am trying to transfer to the pipeline of new assets.
In my current (i.e. pre-3.1) directory structure, there is something like:
public/
foo/
model.js
controller.js
etc...
So, I'm trying to move them to lib / assets / javascripts and keep the foo / subdirectory intact (instead of make foo_model.js, foo_controller.js, etc.).
In my application.js application, I tried to do:
//= require foo/model
and
//= require 'foo/model'
But that will not work. Rails always gives me an error page and says:
couldn't find file 'foo/model.js'
, , , , , lib/assets - . , , , , foo_model.js ..