Skip to content

Instantly share code, notes, and snippets.

@theleoborges
Created January 22, 2011 05:13
Show Gist options
  • Save theleoborges/790879 to your computer and use it in GitHub Desktop.
Save theleoborges/790879 to your computer and use it in GitHub Desktop.
upgrading-appconstants-to-rails-3#1
class AppConstantsGenerator < Rails::Generators::Base
def self.source_root
@source_root ||= File.expand_path('../templates', __FILE__)
end
def copy_config_files
copy_file('constants.yml', 'config/constants.yml')
copy_file('load_app_constants.rb', 'config/initializers/load_app_constants.rb')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment