eBooru/app/inputs/form_builder_common.rb
Earlopain fc7d84affd
[RuboCop] Enable Style/FrozenStringLiteralComment
This reduces allocations on the posts page by about 5%, from basic testing
2024-02-25 18:15:55 +01:00

11 lines
280 B
Ruby

# frozen_string_literal: true
module FormBuilderCommon
def insert_autocomplete(options)
options[:input_html] ||= {}
options[:input_html][:data] = {}
options[:input_html][:data][:autocomplete] = options[:autocomplete] if options[:autocomplete]
options
end
end