Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Rails coupling #1

skrat opened this Issue · 3 comments

2 participants


lots of people have something similar made by themselves, but I think's there is mistake at very core. In README you explain how to integrate this with Rails app, but this is really domain of deployment, not a web app framework. So, could this be made into Capistrano plugin?


In order to provide all the functionality I needed there was no other way than to hook into the asset_host and asset_id methods of Rails.

That said, if you think there is a way to avoid these hooks, please enlighten me :)


I like the idea of using unique hash in URL, but might be really better to move into deployment domain (, I would like to use this with sinatra app


The unique hash in the URL forces the coupling with the webframework. The framework must figure out the URL of the asset. Also when serving gzipped assets, we need to know the user-agent to make sure the browser supports it.

I'm not that familiar with Sinatra but you should be able to make an asset_tag_helper that uses the gem fairly easy. Or if there is already an asset-host library for Sinatra, I could look into making a hook for that as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.