How to create form with model inheritances Dynomite::Item?

Now、I try to create form to create new instance whose class inheritance Dynomite::Item.
I implement as Rails, but, below error happens.

ActionView::Template::Error at /fields/new
The Jets link_to helper only supports some types of arguments. Please provided a String or an object that supports ActiveModel to link_to as the the second argument.

Please tell me how to create form with model inheritances Dynomite::Item.

Below is Model and Controller and VIew.

  • Model

    class Field < Dynomite::Item
      partition_key "id"
      column :id, :longitude, :latitude, :name
    end
    
  • Controller

    class FieldsController < ApplicationController
      def new
        @field = Field.new
      end
    
      def create
        @field = Field.new(field_params)
    
        if @field.replace
          redirect_to field_path(@field.id)
        else
          render :new
        end
     end
    end
    
  • View

    = form_with(model: @field, local: true) do |f|
      .field
        = f.label :longitude
        = f.number_field :longitude, class: "form-control"
      .field
       = f.label :latitude
       = f.number_field :latitude, class: "form-control"
    = f.submit
1 Like

Were you able to resolve this? Im getting the same error.