I built a multistep form with wicked-gem consisting of three steps.
The last step should be callable 1 to x times.
So I added another button to my form:
if current_step?(:add_principal_claim)
    = file.submit value: 'next_claim', class: 'button tiny radius'
    = link_to 'finish', Wicked::FINISH_STEP, method: :put, class: 'button tiny radius'
and add another step in my controller
steps :add_file_header, :add_claim_header, :add_principal_claim, :next_principal_claim
def show
    if step == :add_claim_header
        case step
            when :next_principal_claim
                redirect_to wizard_path(:add_principal_claim)
            else
                render_wizard
        end
    end
end
The last needed step is :add_principal_claim. If neccessary it should be called several times to store more than one dataset to the model.
Calling the form from the previuos step leads into show action and renders the add_principal_claim view, clicking the file.submit button leads to the update action in the controller, stores the dataset into the model and recalls the add_principal_claim view as intended.
How can I get the link_to button to jump into update action, store the dataset and then finally jump out of the wizard?
Any suggestion would be appreciated.