Personally I'd make a YAML file and add an initialiser to put it in a constant. Or even just a const in environment.rb application_helper won't be available to any of your models, so you'd hose yourself if you decided to use it in the future outside of a view context.
-C On 25/03/2010, at 12:00 PM, Joshua Partogi wrote: > Hi all, > > 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? > > The version number that I will be using will be retrieved from git > tag. I also need to display this in the views template. I was thinking > to write it in application_helper, but I was unsure if this would be > the best practice. Can you please share your experience? > > Thank you in advance for all of your suggestions. > > > Cheers. > > -- > http://twitter.com/scrum8 > > -- > 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. > -- 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.
