This is fast! Thank you so much Steven!, it saves me a night for good sleep.
Best regards,
sammy
rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org 写道:
Send Rails mailing list submissions to
rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.rubyonrails.org/mailman/listinfo/rails
or, via email, send a message with subject or body ''help'' to
rails-request-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
You can reach the person managing the list at
rails-owner-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Rails digest..."
Today''s Topics:
1. clear out a text field on an ajax page (Matthew Margolis)
2. Re: newbie question: Anyone can help me about this bug
(Steven Critchfield)
----------------------------------------------------------------------
Message: 1
Date: Mon, 22 Aug 2005 12:10:29 -0600
From: Matthew Margolis
Subject: [Rails] clear out a text field on an ajax page
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID: <430A1515.9020707-63mtpxcE9Cs@public.gmane.org>
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
After submitting a remote form a text field that is submitted still
contains the user input. To avoid confusion I would like to clear out
this box so that the user understands that their information has been
submitted.
What would be the best way to clear out the text field after it is
submitted? I assume javascript provides some means of doing this?
Thank you,
Matt Margolis
------------------------------
Message: 2
Date: Mon, 22 Aug 2005 12:16:12 -0500
From: Steven Critchfield
Subject: Re: [Rails] newbie question: Anyone can help me about this
bug
To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
Message-ID:
<1124730972.14487.8.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
Content-Type: text/plain
On Tue, 2005-08-23 at 00:56 +0800, s c wrote:
> The user_controller.rb is
> class UserController < ApplicationController
> before_filter :login_required
> scaffold :user
> def list
> current_user_id = params[:id]
> @an_user = User.find(current_user_id)
of you pass find an id to fetch for you, you do not receive a list but
rather a single object.
> Welcome back!
>
Since you do not have a list, the each in the above line doesn''t make
sense and is the reason for your error message. You should be able to
just access the @an_user.first_name directly.
>
>
>
>
>
> > logout", :controller=>"account",
:action=>"logout"%>
>
>
>
--
Steven Critchfield
------------------------------
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails
End of Rails Digest, Vol 11, Issue 296
**************************************
---------------------------------
DO YOU YAHOO!?
雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails