No implicit conversion of Symbol into Integer when passing url in a form

167 views Asked by At

I'm trying to convert my form from

<%= form_for(@user) do |f| %>

to

<%= form_for(@user, url: signup_path) do |f| %>

However, since the form is a shared form for both create and update actions, I am trying to use

<%= form_for(@user, yield(:url)) do |f| %> in the form and

<% provide(:url, "signup_path") %> in the view.

But I am getting the error that

ActionView::Template::Error:ActionView::Template::Error: 
no implicit conversion of Symbol into Integer

Anyone with an idea what causes that error?

0

There are 0 answers