-
Notifications
You must be signed in to change notification settings - Fork 351
Expand file tree
/
Copy pathbootstrap_form.rb
More file actions
41 lines (34 loc) · 948 Bytes
/
Copy pathbootstrap_form.rb
File metadata and controls
41 lines (34 loc) · 948 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# frozen_string_literal: true
require "action_view"
require "action_pack"
require "bootstrap_form/action_view_extensions/form_helper"
require "bootstrap_form/configuration"
module BootstrapForm
extend ActiveSupport::Autoload
eager_autoload do
autoload :Configuration
autoload :FormBuilder
autoload :FormGroupBuilder
autoload :FormGroup
autoload :Components
autoload :Inputs
autoload :Helpers
end
class << self
def eager_load!
super
BootstrapForm::Components.eager_load!
BootstrapForm::Helpers.eager_load!
BootstrapForm::Inputs.eager_load!
end
def deprecator
@deprecator ||= ActiveSupport::Deprecation.new("a future release", "BootstrapForm")
end
end
mattr_accessor :field_error_proc
# rubocop:disable-next Style/ClassVars
@@field_error_proc = proc do |html_tag, _instance_tag|
html_tag
end
end
require "bootstrap_form/engine" if defined?(Rails)