Chad WoolleyChad Woolley
Standup 8/1/2008
edit Posted by Chad Woolley on Friday August 01, 2008 at 06:18PM

Interesting

  • If you need to add inflections in Rails, make sure you do it before your initializer block in environment.rb. If you put it after the initializer, it will cause your routes to be re-parsed, which will slow down app/test startup significantly. For example:
  require 'active_support'
  ActiveSupport::Inflector.inflections do |inflect|
    inflect.irregular "criterion", "criteria"
    inflect.irregular "Criterion", "Criteria"
  end

  Rails::Initializer.run do |config|

Comments

  1. Xavier Shay Xavier Shay on August 04, 2008 at 02:04AM

    You need an extra hack if you're using ActiveScaffold:

    http://rhnh.net/2008/08/04/speeding-up-rails-initialization