diff --git a/lib/activeadmin_addons/support/input_helpers/input_methods.rb b/lib/activeadmin_addons/support/input_helpers/input_methods.rb index d99694e2..0b12655e 100644 --- a/lib/activeadmin_addons/support/input_helpers/input_methods.rb +++ b/lib/activeadmin_addons/support/input_helpers/input_methods.rb @@ -1,7 +1,11 @@ module ActiveAdminAddons module InputMethods def model_name - valid_object.class.to_s.underscore.tr('/', '_') + if respond_to?(:builder) && builder.options[:as].present? + builder.options[:as] + else + valid_object.class.to_s.underscore.tr('/', '_') + end end def valid_method