Module: Reusable::Rails::Controllers::ReloadFilter
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/reusable/rails/controllers/reload_filter.rb
Instance Method Summary collapse
-
#_reload_libs ⇒ Object
Iterate over every directory specified in RELOAD_LIBS and re-require the file.
-
#_reload_libs? ⇒ Boolean
Conditional check to ensure that we should reload libraries.
Methods included from ActiveSupport::Concern
append_features, extended, included
Instance Method Details
#_reload_libs ⇒ Object
Iterate over every directory specified in RELOAD_LIBS and re-require the file.
18 19 20 21 22 |
# File 'lib/reusable/rails/controllers/reload_filter.rb', line 18 def _reload_libs RELOAD_LIBS.each do |lib| require_dependency lib end end |
#_reload_libs? ⇒ Boolean
Conditional check to ensure that we should reload libraries. If RELOAD_LIBS is not defined, we skip this. It is a good idea to also ensure we are in development mode when defining it.
(see #_reload_libs)
31 32 33 |
# File 'lib/reusable/rails/controllers/reload_filter.rb', line 31 def _reload_libs? defined? RELOAD_LIBS end |