sorcery gem virtual fields problem

13 views
Skip to first unread message

roelof

unread,
Nov 11, 2012, 12:50:18 PM11/11/12
to rubyonra...@googlegroups.com
Hello,
 
I  have to make this form :
 
# app/views/users/_form.html.erb
<div class="field">
   <%= f.label :password %><br />
   <%= f.password_field :password %>
</div>
<div class="field">
   <%= f.label :password_confirmation %><br />
   <%= f.password_field :password_confirmation %>
</div>
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
 

Norbert Melzer

unread,
Nov 11, 2012, 1:42:34 PM11/11/12
to rubyonra...@googlegroups.com

Form_for/form_tag is missing.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonra...@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-ta...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/WCYVAIVWu5oJ.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

roelof

unread,
Nov 11, 2012, 1:48:08 PM11/11/12
to rubyonra...@googlegroups.com
Oke, then there is a error in the tutorial.
 
Roelof

Op zondag 11 november 2012 19:43:14 UTC+1 schreef Norbert Melzer het volgende:

Norbert Melzer

unread,
Nov 11, 2012, 3:08:27 PM11/11/12
to rubyonra...@googlegroups.com

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.
:-)

To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/mdrKG1Jpac0J.

roelof

unread,
Nov 11, 2012, 3:55:02 PM11/11/12
to rubyonra...@googlegroups.com
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
 
 

Op zondag 11 november 2012 21:09:06 UTC+1 schreef Norbert Melzer het volgende:
Reply all
Reply to author
Forward
0 new messages