Changeset 6212
- Timestamp:
- 02/23/07 00:32:27 (3 years ago)
- Files:
-
- trunk/railties/CHANGELOG (modified) (1 diff)
- trunk/railties/environments/environment.rb (modified) (1 diff)
- trunk/railties/lib/initializer.rb (modified) (3 diffs)
- trunk/railties/lib/rails_generator/generators/applications/app/app_generator.rb (modified) (1 diff)
- trunk/railties/Rakefile (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/railties/CHANGELOG
r6197 r6212 1 1 *SVN* 2 3 * Added config/initializers where all ruby files within it are automatically loaded after the Rails configuration is done, so you don't have to litter the environment.rb file with a ton of mixed stuff [DHH] 2 4 3 5 * For new apps, generate a random secret for the cookie-based session store. [Jeremy Kemper] trunk/railties/environments/environment.rb
r6211 r6212 50 50 51 51 # See Rails::Configuration for more options 52 53 # Application configuration should go into files in config/initializers 54 # -- all .rb files in that directory is automatically loaded 52 55 end 53 54 # Add new inflection rules using the following format55 # (all these examples are active by default):56 # Inflector.inflections do |inflect|57 # inflect.plural /^(ox)$/i, '\1en'58 # inflect.singular /^(ox)en/i, '\1'59 # inflect.irregular 'person', 'people'60 # inflect.uncountable %w( fish sheep )61 # end62 63 # Add new mime types for use in respond_to blocks:64 # Mime::Type.register "text/richtext", :rtf65 # Mime::Type.register "application/x-mobile", :mobile66 67 # Include your application configuration belowtrunk/railties/lib/initializer.rb
r6127 r6212 71 71 # * #load_observers 72 72 # * #initialize_routing 73 # * #after_initialize 74 # * #load_application_initializers 73 75 # 74 76 # (Note that #load_environment is invoked twice, once at the start and … … 113 115 # the framework is now fully initialized 114 116 after_initialize 117 118 load_application_initializers 115 119 end 116 120 … … 335 339 end 336 340 341 def load_application_initializers 342 Dir["#{RAILS_ROOT}/config/initializers/**/*.rb"].each do |initializer| 343 load(initializer) 344 end 345 end 346 337 347 protected 338 348 # Return a list of plugin paths within base_path. A plugin path is trunk/railties/lib/rails_generator/generators/applications/app/app_generator.rb
r5691 r6212 122 122 app/views/layouts 123 123 config/environments 124 config/initializers 124 125 db 125 126 doc trunk/railties/Rakefile
r5390 r6212 39 39 40 40 41 BASE_DIRS = %w( 42 app config/environments components db doc log lib lib/tasks public script script/performance script/process test vendor vendor/plugins 43 tmp/sessions tmp/cache tmp/sockets tmp/pids 41 BASE_DIRS = %w( 42 app 43 config/environments 44 config/initializers 45 components 46 db 47 doc 48 log 49 lib 50 lib/tasks 51 public 52 script 53 script/performance 54 script/process 55 test 56 vendor 57 vendor/plugins 58 tmp/sessions 59 tmp/cache 60 tmp/sockets 61 tmp/pids 44 62 ) 45 63