module CollectiveIdea module VersionNumber # app_version will return Version: 123 by default. # pass options in as you would to content_tag to override. # "Version: " is controlled by the :prefix option. def app_version(options = {}) options = {:tag => 'span', :prefix => "Version: ", :id => "version_number"}.merge(options) content_tag options.delete(:tag), "#{options.delete(:prefix)}#{APP_VERSION}", options end end end