lib/tao_ui/engine.rb in tao_ui-0.2.10 vs lib/tao_ui/engine.rb in tao_ui-0.3.0
- old
+ new
@@ -1,16 +1,21 @@
require 'autoprefixer-rails'
require 'tao_on_rails'
-require 'tao_ui/components'
-require 'tao_ui/action_view/helpers'
module TaoUi
class Engine < ::Rails::Engine
+ config.eager_load_paths += Dir["#{config.root}/lib"]
+
config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.{rb,yml}')]
+
paths['app/views'] << 'lib/views'
- initializer "tao_ui.view_helpers" do |app|
+ ::ActiveSupport.on_load :tao_components do
+ load_tao_components TaoUi::Engine.root
+ end
+
+ initializer "tao_ui" do
::ActiveSupport.on_load :action_view do
include TaoUi::ActionView::Helpers
end
end