Sha256: 78b12147675b6ca7778bbd298f92e3ebf7c1fdcdbc644f672693b4bfa497e120

Contents?: true

Size: 904 Bytes

Versions: 3

Compression:

Stored size: 904 Bytes

Contents

require "weeler/action_controller/acts/restful"
require "weeler/action_dispatch/routing/mapper"
require "weeler/action_view/helpers/form_helper"
require "weeler/action_view/helpers/translation_helper"

module Weeler

  class Engine < ::Rails::Engine
    config.railties_order = [:main_app, Weeler::Engine, :all]
    config.weeler = Weeler

    config.i18n.available_locales = [:en] unless config.i18n.available_locales.present?

    config.assets.precompile += ["weeler/init.js", "weeler/init.css"]

    # Load extend Rails classes
    ::ActionDispatch::Routing::Mapper.send(:include, Weeler::ActionDispatch::Routing::Mapper)
    ::ActionController::Base.send(:include, Weeler::ActionController::Acts::Restful)
    ::ActionView::Helpers::FormBuilder.send(:include, Weeler::ActionView::Helpers::FormHelper)

    ::ActionView::Base.send(:include, Weeler::ActionView::Helpers::TranslationHelper)
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
weeler-1.0.2 lib/weeler/engine.rb
weeler-1.0.1 lib/weeler/engine.rb
weeler-1.0.0 lib/weeler/engine.rb