Sha256: 99b140d2cf66c7449dbe9055e55a792e010c6f40bfcb5d9da05b43e679fb8310
Contents?: true
Size: 632 Bytes
Versions: 2
Compression:
Stored size: 632 Bytes
Contents
module QuickSearch class Engine < ::Rails::Engine isolate_namespace QuickSearch initializer :quick_search, :after => :add_view_paths do config_file = File.join(Rails.root, "/config/quick_search_config.yml") if File.exist?(config_file) APP_CONFIG = YAML.load_file(config_file)[Rails.env] ActiveSupport.on_load(:action_controller) do theme_engine_class = "#{QuickSearch::Engine::APP_CONFIG['theme'].classify}::Engine".constantize prepend_view_path theme_engine_class.root.join('app', 'views', QuickSearch::Engine::APP_CONFIG['theme']) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
quick_search-core-0.0.1 | lib/quick_search/engine.rb |
quick_search-core-0.0.1.test | lib/quick_search/engine.rb |