We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaf18a4 commit 5c0d9a5Copy full SHA for 5c0d9a5
lib/active_admin/form_builder.rb
@@ -125,6 +125,14 @@ def active_admin_input_class_name(as)
125
"ActiveAdmin::Inputs::#{as.to_s.camelize}Input"
126
end
127
128
+ # Copy Formtastic 2.1.1's #input_class in case user has Formtastic 2.2
129
+ def input_class(as)
130
+ @input_classes_cache ||= {}
131
+ @input_classes_cache[as] ||= begin
132
+ Rails.application.config.cache_classes ? input_class_with_const_defined(as) : input_class_by_trying(as)
133
+ end
134
135
+
136
# prevent exceptions in production environment for better performance
137
def input_class_with_const_defined(as)
138
input_class_name = custom_input_class_name(as)
0 commit comments