= "#{name.to_s.camelize}Component".constantize render(component.new(*args, **kwargs), &) end end <%= form_with model: [:admin, @record] do |f| %> <%= component :form, model: @record do %> <%= component :form_field_text, form: f, attribute: :email %> <%= component :form_field_text, form: f, attribute: :nick_name %> <%= component :form_field_password, form: f, attribute: :password, autocomplete: 'new-password' %> <%= component :form_field_password, form: f, attribute: :password_confirmation %> <% end %> <% end %>