Flowdock
method

add_lib_to_load_path!

Importance_2
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: Rails::Application

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v4.1.8) is shown here.

These similar methods exist in v6.1.7.7:

add_lib_to_load_path!() public

This method is called just after an application inherits from Rails::Application, allowing the developer to load classes in lib and use them during application configuration.

class MyApplication < Rails::Application
  require "my_backend" # in lib/my_backend
  config.i18n.backend = MyBackend
end

Notice this method takes into consideration the default root path. So if you are changing config.root inside your application definition or having a custom Rails application, you will need to add lib to $LOAD_PATH on your own in case you need to load files in lib/ during the application configuration as well.

Show source
Register or log in to add new notes.