I want to add a custom attribute to every input generated by simple_form. The attribute value is based on model name and field. So I did this:
# app/inputs/base.rb
class Base < SimpleForm::Inputs::Base
def input_html_options
super['custom-attr'] = "#{object_name}.#{attribute_name}"
end
end
This isn't working. The code is not being loaded for execution at all. Am I missing something here?