class SimpleForm::FormBuilder

def lookup_model_names #:nodoc:

Experimental RBS support (using type sampling data from the type_fusion project).

def lookup_model_names: () -> untyped

This signature was generated using 1 sample from 1 application.

:nodoc:

["route", "blocks", "blocks_learning_object", "foo"]
route[blocks_attributes][0][blocks_learning_object_attributes][1][foo_attributes]

Example:

explicit child indexes.
Extract the model names from the object_name mess, ignoring numeric and
def lookup_model_names #:nodoc:
  @lookup_model_names ||= begin
    child_index = options[:child_index]
    names = object_name.to_s.scan(/(?!\d)\w+/).flatten
    names.delete(child_index) if child_index
    names.each { |name| name.gsub!('_attributes', '') }
    names.freeze
  end
end