forked from bootstrap-ruby/bootstrap_form
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathengine.rb
More file actions
22 lines (17 loc) · 712 Bytes
/
engine.rb
File metadata and controls
22 lines (17 loc) · 712 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# frozen_string_literal: true
require "rails/railtie"
module BootstrapForm
class Engine < Rails::Engine
config.eager_load_namespaces << BootstrapForm
config.autoload_paths << File.expand_path("lib", __dir__)
config.bootstrap_form = BootstrapForm.config
config.bootstrap_form.default_form_attributes ||= {}
config.bootstrap_form.group_around_collections = Rails.env.development? if config.bootstrap_form.group_around_collections.nil?
initializer "bootstrap_form.configure" do |app|
BootstrapForm.config = app.config.bootstrap_form
end
initializer "bootstrap_form.deprecator" do |app|
app.deprecators[:bootstrap_form] = BootstrapForm.deprecator
end
end
end