November 2013
Intermediate to advanced
200 pages
4h 31m
English
A Rails application is generated with three assets directories by default: app/assets, lib/assets, and vendor/assets. Our assets should be split between those directories in the same way we’d split our code: the app directory should contain assets related directly to our application, the lib directory should hold isolated JavaScript or stylesheet components that would be useful beyond our application, and the vendor directory should contain third-party files.
We’d like to watch for filesystem changes in each of these directories. One option is to manually check the modification time of each file in those directories every second or less. This is filesystem polling. Polling may be a good starting point, ...