On 25/03/2010, at 12:00 PM, Joshua Partogi wrote:
> This might be a trivial questions for all of you here. My question is,
> where would be the best location to put version number in Rails apps?

I like to have a config hash / object available throughout my application for 
fetching this kind of information. This means I can call something like 
"AppConfig.version", "AppConfig.advertisements_enabled?" or 
"AppConfig.paypal_settings" anywhere in the application. In the case of 
"AppConfig.version", it either loads the version from a file called VERSION in 
the root of the project (put there by Capistrano), or it returns the result of 
%x( git describe ).chomp!


Cheers,

Nathan

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
or Rails Oceania" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rails-oceania?hl=en.

Reply via email to