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|
You need an extra hack if you’re using ActiveScaffold:
http://rhnh.net/2008/08/04/speeding-up-rails-initialization
August 4, 2008 at 2:04 am