Rails Configuration: use Proc's or method overrides?

I came across a ticket by Craig W. at


and found it quite interesting.

This patch allows you to set the way that asset paths are rewritten. My
own use case was to accommodate a server setup where not all of the
assets have the same mtime even if they’re the same file.

If this is not set then it falls back to the default of using
ENV[‘RAILS_ASSET_ID’] or the file mtime.


Normally you’d calculate RELEASE_NUMBER at startup.

config.action_controller.asset_path_template = proc { |asset_path|
End Quote.

I feel it goes to the heart of Rails, namely, how should configuring an
application be organized? In this case it seemed to me better to make
use of Ruby method overrides.

At the same time, it would be good to have some uniformity with respect
to configuration. Meaning when developing a patch like this, it would be
good to have a guide.

What do you think?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs