1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Include two default initializers as examples

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6213 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
David Heinemeier Hansson 2007-02-23 00:53:22 +00:00
parent c6d6082562
commit 7bf757d8b8
4 changed files with 21 additions and 3 deletions

View file

@ -197,11 +197,14 @@ task :copy_configs do
cp "configs/apache.conf", "#{PKG_DESTINATION}/public/.htaccess"
cp "environments/boot.rb", "#{PKG_DESTINATION}/config/boot.rb"
cp "configs/initializers/inflections.rb", "#{PKG_DESTINATION}/configs/initializers/inflections.rb"
cp "configs/initializers/mime_types.rb", "#{PKG_DESTINATION}/configs/initializers/mime_types.rb"
cp "environments/boot.rb", "#{PKG_DESTINATION}/config/boot.rb"
cp "environments/environment.rb", "#{PKG_DESTINATION}/config/environment.rb"
cp "environments/production.rb", "#{PKG_DESTINATION}/config/environments/production.rb"
cp "environments/production.rb", "#{PKG_DESTINATION}/config/environments/production.rb"
cp "environments/development.rb", "#{PKG_DESTINATION}/config/environments/development.rb"
cp "environments/test.rb", "#{PKG_DESTINATION}/config/environments/test.rb"
cp "environments/test.rb", "#{PKG_DESTINATION}/config/environments/test.rb"
end
task :copy_binfiles do

View file

@ -0,0 +1,8 @@
# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
# end

View file

@ -0,0 +1,3 @@
# Add new mime types for use in respond_to blocks:
# Mime::Type.register "text/richtext", :rtf
# Mime::Type.register "application/x-mobile", :mobile

View file

@ -44,6 +44,10 @@ class AppGenerator < Rails::Generator::Base
m.template "configs/routes.rb", "config/routes.rb"
m.template "configs/apache.conf", "public/.htaccess"
# Initializers
m.template "configs/initializers/inflections.rb", "config/initializers/inflections.rb"
m.template "configs/initializers/mime_types.rb", "configs/initializers/mime_types.rb"
# Environments
m.file "environments/boot.rb", "config/boot.rb"
m.template "environments/environment.rb", "config/environment.rb", :assigns => { :freeze => options[:freeze] }