sorcery gem virtual fields problem

Hello,

I have followed this tutorial : https://github.com/NoamB/sorcery/wiki/Simple-Password-Authentication

I have to make this form :

app/views/users/_form.html.erb

<%= f.label :password %>
<%= f.password_field :password %>
<%= f.label :password_confirmation %>
<%= f.password_field :password_confirmation %>

Where f is a sort of virtual field.

But when I run this I get a error message that the variable f is not known.

How can I solve this ?

Roelof

Form_for/form_tag is missing.

Oke, then there is a error in the tutorial.

Roelof

No, there ins Nov error in the Tutorial, it’s just that the snippet you posted is very early in that tutorial if you had completed it before asking then you had found the complete Form in the partial.
:slight_smile:

I have completed that page.

I see two forms but they are not the same.

The first is this one : # app/views/users/_form.html.erb
and the second one is this one : # app/views/user_sessions/_form.html.erb

Roelof