Adding a directory to the load path in Rails?

后端 未结 8 1041
囚心锁ツ
囚心锁ツ 2020-12-04 14:25

As of Rails 2.3, what\'s the right way to add a directory to the load path so that it hooks into Rails\' auto-reloading mechanisms?

The specific example I\'m thinkin

8条回答
  •  醉酒成梦
    2020-12-04 14:37

    In Rails 3, you can set this in config/application.rb, where this sample is provided by default:

    # Add additional load paths for your own custom dirs
    # config.load_paths += %W( #{config.root}/extras )
    

提交回复
热议问题