When we start our Rails server, the first request will generate a cache for rwr-view_helpers in the form of json & js files with hash mapping assets’ urls to urls with a generated digest-hash.
The .gif, .jpg, .png file extensions are supported by default. More can easily be added, according to the user’s needs.
The installation of helpers is really straightforward, all you have to do is:
$ npm install --save rwr-view-helpers
$ gem 'rwr-view_helpers'
Using helpers is extremely easy - they’re simply exported as a function from our node module:
$ rake tmp:clear
While, at the moment, there is only imagePath helper - we are looking forward to adding more. If you are missing something you really need, let us know or, even better, open PR!
We’re currently working on automating the cache generation process with assets watcher, so make sure to star our repo and stay tuned for amazing updates in the near future.