Sha256: 4d7e991cd119a7912a4c9428c4699a2a359433e60415cf00f8476a30826ba62d

Contents?: true

Size: 1.21 KB

Versions: 16

Compression:

Stored size: 1.21 KB

Contents

# to load pagination in rails app
require 'will_paginate'
require 'jquery-rails'
require 'popper_js'
require 'bootstrap'
require 'simple_form' if system('gem list -i simple_form', :out => File::NULL)

module UiBibz
  module Rails
    class Engine < ::Rails::Engine

      initializer "ui_bibz.helpers" do
        ActionView::Base.send :include, UiBibz::Helpers::UtilsHelper
      end

      initializer "ui_bibz.helpers.ui" do
        ActionView::Base.send :include, UiBibz::Helpers::Ui::CoreHelper
        ActionView::Base.send :include, UiBibz::Helpers::Ui::UxHelper
      end

      config.autoload_paths += Dir["#{config.root}/lib/ui_bibz/inputs/**/"] if defined?(::SimpleForm)

      initializer "ui_bibz.helpers.form" do
        ActionView::Base.send :include, UiBibzForm
      end

      initializer 'font-awesome-sass.assets.precompile', group: :all do |app|
        config.assets.precompile << /\.(?:svg|eot|woff|woff2|ttf)\z/
      end

      config.after_initialize do
        unless UiBibz.configured?
          warn '[Ui Bibz] Ui Bibz is not configured in the application and will use the default values.' + ' Use `rails generate ui_bibz:install` to generate the Ui Bibz configuration.'
        end
      end

    end

  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
ui_bibz-2.3.10 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.9 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.8 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.7 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.6 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.5 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.4 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.3 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.2 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.1 lib/ui_bibz/rails/engine.rb
ui_bibz-2.3.0 lib/ui_bibz/rails/engine.rb
ui_bibz-2.2.2 lib/ui_bibz/rails/engine.rb
ui_bibz-2.2.1 lib/ui_bibz/rails/engine.rb
ui_bibz-2.2.0 lib/ui_bibz/rails/engine.rb
ui_bibz-2.1.6 lib/ui_bibz/rails/engine.rb
ui_bibz-2.1.5 lib/ui_bibz/rails/engine.rb