internetchris wrote:
[...]
>  In rails if I'm working on the New or Edit form I want to add a
> button that finds the last record in the table, take the account
> number, and then increment it by one and then replace the contents of
> the account field on my form with that new number.

No you don't.  You want to define an autoincrementing account number in 
the database and let the database pick the next unused number. (In fact, 
you can use the id field for this.)

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]

-- 
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 [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