Hi David,

David wrote:
>
> I am using prototype to create modal popups for my login and register
> pages, but the fields are populating with the data from certain
> variables.  For example, I have a show page that finds a user like
> so:
>
> @user = User.find(params[:id])
>
> and my form uses:
> <% form_for :user, :url => users_path do |f| -%>
>
> so it is populating the form with the data from @user.  Should I
> rename the @user variable, or is there a way to avoid the populating
> of the form?

You should be doing the find in the controller and calling the new method to
return a new, empty object or the edit method to return an existing object.

HTH,
Bill


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to