Module: Dependencies
- Defined in:
- lib/rails.rb
Overview
:nodoc:#
Constant Summary collapse
- @@models_dir =
File.(File.join(RAILS_ROOT,'app','models'))
Instance Method Summary collapse
- #require_or_load(file_name, *args) ⇒ Object
-
#require_or_load_old ⇒ Object
don’t reload models…
Instance Method Details
#require_or_load(file_name, *args) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/rails.rb', line 8 def require_or_load(file_name, *args) file_name = $1 if file_name =~ /^(.*)\.rb$/ = File.(file_name) old_mechanism = Dependencies.mechanism if =~ /^#{@@models_dir}/ RAILS_DEFAULT_LOGGER.debug "*** Not reloading #{file_name}" Dependencies.mechanism = :require end require_or_load_old(file_name, *args) Dependencies.mechanism = old_mechanism end |
#require_or_load_old ⇒ Object
don’t reload models… it doesn’t work anyway, not sure why they haven’t done this? submit as patch?
7 |
# File 'lib/rails.rb', line 7 alias require_or_load_old require_or_load |