I have a login with a model of "users", which I''ve been able
to get
working, with one field being "company". This is a main user who can
add
groups, so other group-users can login separately. In the groups table I
have a user_id so I know the connection. When I have a login form for
groups where I''ve added three fields; company, username and password.
What I don''t know is how I define the company field? Is this right?
<label for="group_user.company">Organisation</label>
<%= text_field "group", "user.company"
%><br/>
<label for="group_username">Login</label>
<%= text_field "group", "username" %><br/>
<label for="group_password">Password</label>
<%= password_field "group", "password"
%><br/>
How do I refere to in the login action and authenticate? And when doing
a validate with validates_presence_of?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---