# File lib/simple_form/form_builder.rb, line 336 def lookup_model_names @lookup_model_names ||= begin child_index = options[:child_index] names = object_name.to_s.scan(/([a-zA-Z_]+)/).flatten names.delete(child_index) if child_index names.each { |name| name.gsub!('_attributes', '') } names.freeze end end