The "foundation_rails_helper" gem is no longer maintained and is incompatible with Rails 7.1. To avoid blocking the upgrade, we've vendored the vendor/foundation_rails_helper/form_builder.rb as a copy of the original FormBuilder class. To mantain compatibility with auto_labels and button_class variables, that are used in the original builder, we are overwriting in the foundation form builder initializer. The gem has been removed from the Gemfile and replaced with this vendored fallback. This workaround is safe to remove once legacy Foundation CSS support is dropped. All vendored code retains the original MIT license and attribution.
17 lines
291 B
Ruby
17 lines
291 B
Ruby
require Rails.root.join("vendor/foundation_rails_helper/form_builder.rb")
|
|
|
|
class FoundationRailsHelper::FormBuilder
|
|
def column_classes(...)
|
|
""
|
|
end
|
|
|
|
def auto_labels
|
|
true
|
|
end
|
|
|
|
def submit(value = nil, options = {})
|
|
options[:class] ||= "success button"
|
|
super
|
|
end
|
|
end
|