Load path in Rails? -


The guide in the Rails has a code to load this way.

  $ LOAD_PATH & lt; & Lt; Path ActiveSupport :: Dependencies.load_paths & lt; & Lt; Path ActiveSupport :: Dependencies.load_once_paths.delete (path)  

First I understand. To know where rabbi files are needed.

But what does the second and third mean?

Yes, the first line is for Ruby (and also $: ) The second one is similar to the first, but for ActiveSupport,

load_once_paths an array of paths whereby the rails will automatically load only once. All elements of this array will also be in load_path.

load_paths An array of extra paths to be included in the load path By default, all apps, labs, vendors and fake paths are included in this list.

Therefore, if you need to reload the dependency on every new request,


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -