Forum: Ruby on Rails Any one who can help with how to implement such a login?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
B2f8ab3942d905a9f0c0f994ea9fdcc1?d=identicon&s=25 George (Guest)
on 2006-03-15 08:52
http://www.wayfaring.com/
I think it is implemented using rails.
For if u input the wrong url,u can see a "rails" style error hint.
I really like its ajax login system.
from the source of the homepage,it can be seen the login part is:
<div>
<h1>Log In</h1>
<form action="/account/login_ajax" method="post" onsubmit="new
Ajax.Request('/account/login_ajax', {asynchronous:true,
evalScripts:true, parameters:Form.serialize(this)}); return false;">
  <b style="color:#fff">Email or Name:</b><br/>
  <input id="account_login" name="account[login]" size="30"
style="width:116px;background:#fff" type="text" /><br/>
  <b style="color:#fff">Password:</b><br/>
  <input id="account_password" name="account[password]" size="30"
style="width:116px;background:#fff" type="password" /><br/>
  <input type="submit" name="login" value="Log In &#187;"
class="primary" style="font-size:12px;"/><br/><br/>
  &nbsp;<a href="/account/forgot_password"
style="font-size:11px;">Forget your password?</a>
</form>
</div>

which can be implemented using form_remote_tag
but how to do that deeply? Anyone has any idea?
B2f8ab3942d905a9f0c0f994ea9fdcc1?d=identicon&s=25 George (Guest)
on 2006-03-15 08:57
I plan to use the Login Engine to do the job

in the login.rhtml
I change the source into as follows(just change from form_tag to
form_remote_tag):
  <div class="form-padding">
    <%= form_remote_tag :action => 'login'  %>
      <table>
        <%= form_input :text_field, "Login ID", "login", :size => 30
%><br/>
        <%= form_input :password_field, "Password", "password", :size =>
30 %><br/>
      </table>

      <div class="button-bar">
        <%= submit_tag 'Login' %>
        <%= link_to 'Register for an account', :action => 'signup' %> |
        <%= link_to 'Forgot my password', :action => 'forgot_password'
%>      </div>
    <%= end_form_tag %>
  </div>

but as soon as i click the "login" button,nothing happens,anyone who can
tell me the reason?thanks a lot!
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-03-15 09:38
(Received via mailing list)
Have you included the default (prototype, etc) javascripts in your
layout?

- james

On 3/15/06, George <georgeway@163.com> wrote:
>         <%= form_input :password_field, "Password", "password", :size =>
>
> but as soon as i click the "login" button,nothing happens,anyone who can
> tell me the reason?thanks a lot$B!*(B
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
* J *
  ~
B2f8ab3942d905a9f0c0f994ea9fdcc1?d=identicon&s=25 George (Guest)
on 2006-03-15 09:52
yeah,prototype has been included,in fact,the project is extended from
the Ajaxscaffold... therefore all the necessaries have been included in
the layout.


James Adam wrote:
> Have you included the default (prototype, etc) javascripts in your
> layout?
>
> - james
>
> On 3/15/06, George <georgeway@163.com> wrote:
>>         <%= form_input :password_field, "Password", "password", :size =>
>>
>> but as soon as i click the "login" button,nothing happens,anyone who can
>> tell me the reason?thanks a lot$B!*(B
>>
>> --
>> Posted via http://www.ruby-forum.com/.
>> _______________________________________________
>> Rails mailing list
>> Rails@lists.rubyonrails.org
>> http://lists.rubyonrails.org/mailman/listinfo/rails
>>
>
>
> --
> * J *
>   ~
This topic is locked and can not be replied to.