login help

2 views
Skip to first unread message

ruthmann88

unread,
May 29, 2010, 12:50:54 PM5/29/10
to Lovd by Less
Hi,

New to ruby on rails, read up quite a bit and still feel a bit lost.
I'm trying to move the login (login.html.erb) onto the main index.
I thought it would be as easy as moving the login form code:

<%= f.text_field :login, :class => "focus_first" %>
<%= f.password_field :password %>
<%= f.wrap(:remember_me, :for => :remember_me){ check_box_tag
'remember_me',1,false, :class=>"checkbox" } %>

to the index, obviously I see I'm wrong. Any help or a point in the
right direction
would be great.

Thank you

Steven Bristol

unread,
May 31, 2010, 8:20:10 AM5/31/10
to lovdb...@googlegroups.com


It looks like you are not moving the form tag. This is really a
general ruby on rails question, please try in the ruby on rails group.

cheers,
steven bristol

ruthmann88

unread,
Jun 3, 2010, 10:52:42 AM6/3/10
to Lovd by Less
Well I have added <% less_form_for @user, :url => login_path, :method
=> :post do |f| %>
but get the same runtime error. I'll try on the ROR group, any other
suggestions would be great.
Maybe the URL needs be changed?
I tried changing it to home_path since it'll be on the index, but that
didn't work either.

On May 31, 8:20 am, Steven Bristol <st...@lesseverything.com> wrote:

Steven Bristol

unread,
Jun 3, 2010, 11:04:42 AM6/3/10
to lovdb...@googlegroups.com
On Thu, Jun 3, 2010 at 10:52 AM, ruthmann88 <s_rut...@sympatico.ca> wrote:
> Well I have added <% less_form_for @user, :url => login_path, :method
> => :post do |f| %>
> but get the same runtime error. I'll try on the ROR group, any other
> suggestions would be great.
> Maybe the URL needs be changed?
> I tried changing it to home_path since it'll be on the index, but that
> didn't work either.

It sounds like you really need to learn some rails. Have you thought
about a tutorial?


cheers,
steve

ruthmann88

unread,
Jun 3, 2010, 11:08:07 AM6/3/10
to Lovd by Less
Yeah, I know. I've done a couple and seem to have understood what was
going on. Like how the Model interacts with the DB and the controller
interacts with the Model and View. Even the lovd by less code seems to
make alot of sense to me, thats why I'm getting frustrated with this
login.

On Jun 3, 11:04 am, Steven Bristol <st...@lesseverything.com> wrote:
Reply all
Reply to author
Forward
0 new messages